1,330 Posted Topics

Member Avatar for joban.ali

Joban, Do I understand correctly the the XML is requested with an AJAX call, then acted on client-side to build out/replace some section of the DOM? If so, then you will need to post sample XML and give some idea of the HTML you want to build otherwise I could …

Member Avatar for keval_hack
0
305
Member Avatar for minitauros

Minitauros, From your description, there appears to be no need for two separate ajax actions. By returning the updated list data (or a null response for failure) from the "delete" action, you can drive both div1 and div2 from a single response handler. If you really want to have two …

Member Avatar for Airshow
0
437
Member Avatar for ashishjannela

Ashishjannela, If I understand correctly, then you need to read [URL="http://code.google.com/apis/maps/documentation/javascript/basics.html#Geolocation"]this[/URL]. [B]Airshow[/B]

Member Avatar for Airshow
0
152
Member Avatar for ivan3510

Ivan, It may have been done with [ICODE]<img src="myLowsrcURL" lowsrc="mySrcURL" />[/ICODE], but lowsrc was never officially adopted by the W3C. Cross-browser support for lowsrc is therefore probably poor (I have not used it for years) but by all means try it. Alternatively you can use [ICODE]<img src="mylowSrcURL" onload="this.src='mySrcURL';" />[/ICODE], which …

Member Avatar for ivan3510
0
98
Member Avatar for anirban1087

Anirban, To keep it simple, don't use a popup. Instead, create the fields on the same page as the original form. For example, they can be inserted in a <div></div> element. It is generally more user-friendly to generate one extra field at a time, so the user does not need …

Member Avatar for Airshow
0
76
Member Avatar for Joe34

As vibhadevit says, eval() should do the job. It should be executed inside a [ICODE]try{...} catch(error){...}[/ICODE] block because the user input is not guaranteed to be good JavaScript. Airshow

Member Avatar for Airshow
0
146
Member Avatar for dschuett

I think the problem is that when $("#" + this.value) selects nothing, then (by definition) no siblings are available to be found, so this approach will never work for the first (null) option, even when all the "available", "in route", "dropped", "delivered" divs are in place. You have to think …

Member Avatar for Airshow
0
668
Member Avatar for dasatti

Dasatti, You could try hard-coding the <form ...></form> then deliver/insert just its contents. If that doesn't work then hard code the whole form and show/hide it and change its properties/contents with DOM methods as necessary. [B]Airshow[/B]

Member Avatar for Airshow
0
295
Member Avatar for azegurb

Azegurb, I have had a hack at your code and in the process come to the conclusion that you might consider something slighly different. Namely : [LIST] [*]a single select menu, from which items are added to the table, and which is much easier to manage than one select menu …

Member Avatar for Airshow
1
325
Member Avatar for moonL!ght

First, get [URL="http://www.amazon.com/JavaScript-Definitive-Guide-David-Flanagan/dp/1565923928"]JavaScript: The Definitive Guide, but David Flanagan[/URL]. Once you have absorbed everything in the book and put it into practise, then read and watch everything available by [URL="http://javascript.crockford.com/"]Douglas Crockford[/URL]. I found his stuff very good after I had been writing JavaScript for a few years. It wouldn't have …

Member Avatar for Airshow
0
101
Member Avatar for deucalion0

I can tell you in principle how to do this. First add <markerset>...</markerset> wrappers around each set. You can give each set attributes to describe it, eg.: <markerset type="summary" name="summary">...</markerset> <markerset type="section" name="Pantera">...</markerset> <markerset type="section" name="Rammstein">...</markerset> Now, you have something that the javascript can read/interpret to display the markers in …

Member Avatar for deucalion0
0
246
Member Avatar for pawarnilesh4u

Client-side should have no problem achieving this. Just make sure that you are not using any global variables that are common to both processes. (Even better, use no globals at all). Server-side is more of a concern. If the first process is CPU intensive, then you are maybe expecting a …

Member Avatar for pawarnilesh4u
0
354
Member Avatar for himit

Himit, First, construct your HTML like this: [CODE] <table id="myTable" border> <tr><th>appid</th><th>appname</th><th>appver</th></tr> <tr><td class="appid">100</td><td class="appname">App 1</td><td class="appver">1.1</td></tr> <tr><td class="appid">200</td><td class="appname">App 2</td><td class="appver">2.2</td></tr> <tr><td class="appid">300</td><td class="appname">App 3</td><td class="appver">3.3</td></tr> </tr> </table> [/CODE] By giving the tds classes, they can be tested/addressed in javascript: Simple: [CODE] $(function(){ $("#myTable tr").click(function(){//click anywhere in a row …

Member Avatar for himit
0
2K
Member Avatar for rom.

Rom, That's caused by event propagation. In other words, the click is firing a click event in the div underlying the checkbox. This can't be cured with either not()or :not because it isn't a question of jQuery selection. Instead, you have to specifically inhibit the click from propagating downwards, like …

Member Avatar for rom.
0
234
Member Avatar for gambit_1607

All very confused Gambit. Let's try for some decomposition: GAMBIT: I have approached this problem by first trying to store the selected value ($("sel_source_zero").value()) into a PHP variable using AJAX. I am trying to use $.ajax() function from jQuery appended to Drupal, but I'm not sure how to approach this. …

Member Avatar for Airshow
0
101
Member Avatar for dschuett

Dschuett, Like this: [CODE]function ajaxFunction(docId){ var ajaxDisplay = document.getElementById('basic-modal-content'); if(!ajaxDisplay) { return false; }//no point continuing if the display div doesn't exist var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e) { // Internet Explorer Browsers …

Member Avatar for dschuett
0
403
Member Avatar for george61

If, as the code in nextImage implies, you propose to use jQuery, then the door is open to doing this far more efficiently than with onclick handlers in the HTML. For example, [ICODE]$items = $("li.lightbox a")[/ICODE] selects all the links in the unordered list. You then have a jQuery object …

Member Avatar for Airshow
0
153
Member Avatar for phouse512

pHouse, You may just need to add <?xml version="1.0"?> to the start of the xmlOutput string to make it recognisable as xml. If you want, you can try doing the server-side code in jQuery instead of raw javascript. It will simplify considerably to something like: [CODE] function startRequest(parentId){ var $comments …

Member Avatar for Airshow
0
340
Member Avatar for rdhiravani

I generally avoid inline divs because of effects like this. Try [ICODE].portlet { ... float:left; ...}[/ICODE] instead. You may need to set left/right margins to get the correct spacing. And remember to set whatever comes next in the HTML to [ICODE]clear:left[/ICODE] or [ICODE]clear:both[/ICODE] to prevent it floating. If floats won't …

Member Avatar for Airshow
0
98
Member Avatar for genzoman

Genzoman, try: [CODE] $('a.closediv').each( function(e){ $(this).bind('click', function(e){ $(this).closest("div.countystats").hide(250); return false; }); }); [/CODE] [B]Airshow[/B]

Member Avatar for Airshow
0
220
Member Avatar for sunny124

Sunny, A pretty standard validation pattern is as follows: [CODE] <script> $j = jQuery.noConflict(); $j(document).ready(function(){ function validation(){ var rtnVal = true;//assume true until any field validator indicates false. // fullname validation rtnVal = rtnVal && is_field_empty($j('#fullname'), $j('#full_name_err_msg')); // other validations here //rtnVal = rtnVal && ......... return rtnVal; } function …

Member Avatar for sunny124
0
322
Member Avatar for penguino138
Member Avatar for Buffalo101

Depending on DOCTYPE, Eclipse has the right to be picky over badly formed HTML. Assuming XHTML, attributes should be in "double quotes". This may fix it: [CODE=HTML]<form action="MyServlet" method="post">[/CODE] [B]Airshow[/B]

Member Avatar for Airshow
0
111
Member Avatar for EternityCoder

Eternity, First, the code will simplify to : [CODE] $(document).ready(function () { $("#logoimg").hover( function () { $(this).attr("src", "Media/imgover.png").animate({ width: 420 }, 300); }, function () { $(this).attr("src", "Media/imgout.png").animate({ width: 400 }, 300); }); }); [/CODE] Secondly, did it work locally then stop working after FTPing to a remote host? If …

Member Avatar for Airshow
0
306
Member Avatar for BaSk

BaSk, To make the animations happen in cascade, not in parallel, you need to use a callback function as one of the arguments to animate(). By having the callback function perform a recursive call to your outer function [ICODE]menuItemsIn[/ICODE], you get a chain reaction that animates each list item in …

Member Avatar for Airshow
0
675
Member Avatar for newbieJS

newbiwJS, There's a nmber of ways to write the code. Here's a simple version: [CODE] var ask = true; while(ask){ var employName = prompt ("Please enter the employee's name" , ""); if (employName === null) {//user cancelled ask = false; break; } else if (employName !== '' && isNaN(Number(employName))) { …

Member Avatar for tcatt
0
3K
Member Avatar for funkyash34

Funkyash, You have created am HTML element with id="bmi" to receive the calculated value. The javascript attempts to put the calculated value into an element with id="txtHint", which doesn't exist. As there's no safety in the code, a javascript error will be thrown. [B]Airshow[/B]

Member Avatar for junior siregar
-1
778
Member Avatar for kgizo

Kgizo, "next page" and "ajax" are mutually exclusive. It's either one or the other. Which do you want? [B]Airshow[/B]

Member Avatar for kgizo
0
166
Member Avatar for lifeworks

Lifeworks, Try : [CODE] ... if(links[x].getAttribute('rel') == 'link_category') ... [/CODE] Or do the whole thing in one line with jQuery : [CODE] function get_product_categories_links(){ return $('a[rel=link_category]').toArray(); } [/CODE] [B]Airshow[/B]

Member Avatar for Airshow
0
229
Member Avatar for bkimbriel

bkimbriel, Why seven functions and seven templates? You could do everything you want with one function and one template, each flexible enough to handle any day. You do need seven containers (divs), one per day, each identifyable by id, to which the newly created elements can be appended. Currently everything …

Member Avatar for Airshow
0
212
Member Avatar for vishalkhialani

Vishalkhialani, I wonder if it's because the images are wider than the column width? Try experimenting by setting all the images to 185px or less. [B]Airshow[/B]

Member Avatar for vishalkhialani
0
94
Member Avatar for klemme

Klemme, As far as I can see, you just need to know how to submit the form you have created. This is done with a submit button : [CODE] <form action="edit_page.php" method="post"> <select class="boxstyles" name="linklabel"> <option>Choose a page to edit</option> <option value="linklabel_1">Title 1</option> <option value="linklabel_2">Title 2</option> <option value="linklabel_3">Title 3</option> </select> …

Member Avatar for Airshow
0
182
Member Avatar for filch

Dave, You need to fix something else first. I'm using Opera here. The tabbed popups are displaced half-offscreen to the left. The tabs don't show. It's may be a question of screen size rather than browser of course. I'm at 1024 x 768. [B]Airshow[/B]

Member Avatar for filch
0
159
Member Avatar for lit108

Lit108, Off the top of my head, I expect you can dynamically create an invisible link, which emulates a facebox link, then emulate that link being clicked, all in one line of jQuery. This line needs to be wrapped in a couple more lines to cause it to fire when …

Member Avatar for Airshow
0
269
Member Avatar for MDanz

MDanz, You are into some murky areas of browser behaviour there, where nothing is guaranteed. You can give it a chance by making sure that the url is always unique at each form submission. Using method="get" (as opposed to "post") will tend to have this effect but the url will …

Member Avatar for Airshow
0
139
Member Avatar for filch

Dave, You need to select by ID, and you can leave class="popup" there. It's explained in the [URL="http://www.gethifi.com/blog/a-jquery-plugin-for-zoomable-interactive-maps"]documentation[/URL]. See section 2 "HTML Data". [B]Airshow[/B]

Member Avatar for Airshow
0
124
Member Avatar for maddie87

Maddie, You probably just need a couple of standard lines of code for cross-browser compatibility. [CODE] function move(evt){ evt = evt || window.event; var target = evt.target || evt.srcElement; ... [/CODE]

Member Avatar for Airshow
0
464
Member Avatar for andrewliu

Andrew, If each group of five elements has a common container (eg. a div, p or tr), then you can try this: Identify everything with classes instead of ids. [LIST] [*]Give #change... elements eg. class="change" [*]Give #cancel... elements eg. class="cancel" [*]Give #...Display elements eg. class="display" [*]Give #...Change elements eg. class="change2" …

Member Avatar for andrewliu
0
156
Member Avatar for rajeesh_rsn

Rajeesh, Try this: [CODE=javascript] function slide() { var $slider = $("#slider"); var pos = $slider.position().left; if(pos>-5400) { $slider.animate({"left":"-=600px"},300); } else { $slider.animate({"left":"0px"},600); } } $(document).ready(function() { var s = setInterval(slide, 3000); }); //if the sliding starts too early, then try instead of the statement in $(document).ready(...) onload = function() { …

Member Avatar for Airshow
0
114
Member Avatar for kekkaishi

kekkaishi, Here's a couple of ways to do what you want. First the HTML - it's best to use class rather than id as the selector, to avoid duplicate ids when we use [ICODE]jquery.clone()[/ICODE]. [CODE=HTML] <div id="content"> <input class="inpu" type="text" /><!-- no need for a counter --> </div> [/CODE] One …

Member Avatar for kekkaishi
0
146
Member Avatar for bkimbriel

Bkim, If I understand correctly then help is readily available in the form of a "combobox". This is a pulldown menu into which the user can also type his own entry - a hybrid form element. HTML doesn't provide native comboboxes but you can employ one of several javascript libraries …

Member Avatar for bkimbriel
0
115
Member Avatar for Drako12

Drako, Try sanitizing your pages by opening them in Notepad (or other simple text editor, definately not MS Word or Wordpad) then "save as ...". Browse the sanitized copies. Any change? Another possibility is to try UTF-16. [B]Airshow[/B]

Member Avatar for Airshow
0
139
Member Avatar for eric8990

Typically you see readyState == 0 when you are "file browsing", ie relying on the operating system to serve the files rather than employing a proper HTML server. If you use a desktop PC as your development environment, then the most realistic option is to install Apache or Microsoft IIS. …

Member Avatar for Airshow
0
161
Member Avatar for samsons17

Samson, I think I understand. You have a set of little forms running down the page. These forms are identical in function but not content. Each form is to be submitted by ajax (not regular HTML form submission). On successful completion of the ajax, an <li> element is to be …

Member Avatar for Airshow
0
180
Member Avatar for ankurmawanda

Ankurmawanda, A script tag with `src="..."` cannot also contain its own code. You need a separate script tag. <script type="text/javascript" src="md5.js"></script> <script type="text/javascript"> function crypt() { document.form1.password.value = calcMD5(document.form1.password.value); } </script> Then it should work but you won't see it happen because the form will be submitted and the page …

Member Avatar for Airshow
0
764
Member Avatar for AJLX

AJLX, The code becomes a bit simpler if you pass in a reference to the input element (form field) itself rather than its value (str). [CODE] //replace function showHint(str){ ... } //with function showHint(inputElement){ var str = inputElement.value; ... } [/CODE] Now you still have easy access to the field's …

Member Avatar for Airshow
0
332
Member Avatar for ello

Ello, I would have to guess that the function is working fine but there's no variation in behaviour each time your "#generate-quote" element(s) are clicked. [LIST] [*]The url is always "generator.php" [*]The data is aways {act: 'char_con'} [*]The callback function always sticks the response into ".quote" element(s). [/LIST] Unless something …

Member Avatar for McLaren
0
175
Member Avatar for Acute

Acute, `$(sel).click(...)` attaches functionality only to matching elements that exist when the command is executed. Use $(sel).[live](http://api.jquery.com/live/)(...) to attach functionality to existing matching elements *and* any future elements that also match sel. **Airshow**

Member Avatar for Acute
0
83
Member Avatar for still_learning

Still_, I've not seen that before and am not aware of any browser that disables javascript in that way - it would be completly inappropriate. I can only guess "disabled-" is being inserted by the server (whichever one you use, Apache, Microsoft IIS etc). Has someone been playing with server …

Member Avatar for Airshow
0
155
Member Avatar for sahil1991

"Pseudoprotocol" (or "pseudo protocol") is sometimes used as a synonym for "javascript url", ie. a link of the form :- [CODE] <a href="javascript:do_something();">Click Me</a> [/CODE] This form should not be used as it is not supported by all browsers. You have two options :- [CODE=html] <a href="#" onclick="do_something(); return false">Click …

Member Avatar for Airshow
0
63

The End.