I want to inject some Json into the Html page returned by the server?
Is there a public function that returns the Json string when Json(someObject) gets called?
Note that I don't want to return Json to the browser in a seperate request. I want to convert an object graph to json and inject it into a script block.
Thanks
...
In Javascript,
str = 'left ui-tabs ui-widget ui-widget-content center right';
Is it possible to remove non 'ui-*' words by invoking str.replace() with regexp ?
The result after invoking str.replace() should be:
str.replace(/ /, '') = 'ui-tabs ui-widget ui-widget-content';
I've tried some regexp patterns, but they doesn't work.
...
I am trying to make a user generated nav bar.
This nav bar because it is dynamically created may have more tabs on it than the width of the nav bar.
That being the case, I would like to make it so that the nav will scroll from left to right.
Currently I use an image mapping technique where I plot coordinates on an image and move divs ...
I have a div where when I hover over it I have a child div (another div) to animate, but when I hover over the child div, the parent div loses focus and the child element starts animating back as if I left the parent div.
Here is the code I am using:
$$(".slide .item").each(function (element) {
element.observe('mouseover', function (e...
I have a dojo.dnd Source object that I just want to list out normally, without the user being able to sort the objects. Is this possible?
...
I have a link on a page that pops up a new window, and sometimes that second window takes a long time to load.
I want to disable the link on the parent window until the child window finishes loading.
I know I can have the child window onload() to alert the parent, but I don't want to mess with the child, so I have a little javascript tha...
I have seen some instances where people will say you have to use JS .style.display = 'none'; and that .NET .Visible = false will not work.
What is the difference between the two and why would something work with the JS and not with the .NET?
An example is http://www.componentart.com/forums/ShowPost.aspx?PostID=27586 (see the bottom pos...
In my MS SQL table, I read in an "time_zone" for a city from a record.
I then want to use this time zone in a Javascript function to create a digital clock for that city.
Currently I am trying to set the time_zone variable from
Here's a code snippet from Default.aspx:
function showtime() {
zone(hiddenZone...
I understand the purpose of GWT, but I'm wondering if I can use it to compile a few functions from Java to JavaScript just to make sure that I don't have to maintain the same code in two different languages.
Or would GWT bring along too much library/support overhead along to make this a reasonable choice?
For future projects, I have th...
How do I remove the buttons in a jquery dialog? Per example, I tried re-calling .dialog with the correct new options, but the dialog seems unaffected.
$('.selector').dialog('option', 'buttons', {} ); does not work, and nor does it work if actual new button strings and functions are declared.
Thoughts?
...
For some reason when I run my game in IE it stops during the preloader. I opened up IE8's debugger and it failed on this line complaining about some run time error.
document.getElementById("mainpreloaderscreen").innerHTML=loaded+"/"+total+"<br><button onclick=\"gamepreload('all')\">load all (not recomended)</button>";
Why does IE do ...
Note: This is a long winded question and requires a good understanding of the MVVM "design pattern", JSON and jQuery....
So I have a theory/claim that MVVM in DHTML is possible and viable and want to know if you agree/disagree with me and why. Implementing MVVM in DHTML revolves around using ajax calls to a server entity that returns J...
I have a timer that grabs a file every 10 seconds:
if((Timer%10=="0")||(Timer=="1")){
I also have a random number generator:
var randomNum = Math.floor(Math.random() * 10) + 2;
I also have a variable which stores the time remaining:
Timer=0;
function countdown(auctionid)
{
var auctions;
var divs;
Timer=Timer+1;
i...
I have an <img ... /> tag that I have bound a click event to in jQuery. When it is clicked I'd like to have it emulate the click of a button on the file upload to open the file system browse pop-up. I've tried these things within the click function and had no success:
...
$(".hiddenUploadBtn").click();
...
...
$(".hiddenUploadBtn").sel...
Can I use javascript to get the system's double click interval?
...
Hello,
This is the html i am using
<tr>
<td>No.</td>
<td id="2" class="editable">data1</td>
<td id="2" class="editable">data2</td>
<td>Usage Left</td>
</tr>
<!-- Multiple rows with different ids -->
and this is my javascript
$(function(){
$('.editable').editable({onSubmit:Update});
function Update(){
var id = ...
Hello, I have a simple html option/select (dropdown) menu. I want to use JQuery to redirect links when an option is selected. I have a "go" button in noscript tags in case javascript is disabled, but in the case that the user has javascript..I would like the redirection to happen automatically on-click. Could somebody please guide me ...
Hey,
For javascript I use the jQuery framework but can easily integrate any javascript functions into it. The problem I have is I have a div that fade's in when I click a link. How can I get it to align in the center of the page and stay even when scrolling.
Below is an example of what I currently have implemented:
HTML code:
<div i...
Hi!
I have coded a page that has two div one beside the other. The first one serves as a nav tree that, when clicked, loads a page in the right div with AJAX. I have to include a javascript file when one of the page is loaded.
I have managed to do jsut that and all works perfectly but each and every time that someone want to see the pa...
Thanks to everyone in advance -
alert((~1).toString(2));
outputs: -10
but in PHP/Java it outputs 11111111111111111111111111111110
Am I missing something, why does Javascript add a "-" to the output?
Thx,
Sam
...