jquery/ajax/loading objects question... - JavaScript Help


if I am loading content into a div using the get feature of jquery, and that content has some clickable objects in it will jquery recognize those as well What I am doing is building a site that tracks bugs on our software. The site pulls the bugs from a mysql db and displays in a table format. There's an edit link which passes the record id number of that bug (via ajax) to a php file, where a form is filled in with the bug data and passed back, a hidden div is then shown with the form in it. Part of the code I pass back has a submit button and a close button (css styled anchors) and I'm using the same process on them as I am on the edit link but not getting any results. My script looks like this:

$(document).ready(function(){ //hide edit form $('#editform').hide(); //toggle bug description $("a.clickable").click(function(){ if ($('#' + $(this).attr('opendesc') + '_bottom').is(':visible')) { //alert($(this).attr('opendesc')); $('#' + $(this).attr('opendesc') + '_bottom').hide('slow'); } else { $('#' + $(this).attr('opendesc') + '_bottom').show('slow'); } }); //close bug description $("a.btnClose").click(function(){ //alert($(this).attr('closedesc')); $('#' + $(this).attr('closedesc')).hide('slow'); }); //close edit window -- not working $("a.btnCloseEdit").click(function(){ alert("you are here!"); $('#editform').hide(); }); //use ajax to load edit bug form $("a.edit").click(function(){ //get item id var itemid = $(this).attr('itemid'); //load edit form data $.get('lib/editform.php', {thisid: itemid}, function(data) { $('#editform').html(data); //alert('Load was performed.'); }); //show edit form $('#editform').show('show'); }); $("a.btnCloseEdit").click(function() { alert("k"); }); });
the last click function, where I'm just posting an alert, binds back to this code, which is on the page being loaded in the ajax call:

//other code SubmitX //other code

I'm a noob with jquery and not sure how it works. Does it sneak peek the page after it loads and get all the objects into some sort of array I'm thinking it is doing that and because I am adding other object through AJAX it is not seeing those, since the page is not being reloaded. Am I missing something here
Posted On: Wednesday 2nd of January 2013 12:38:39 AM Total Views:  287
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Button and calculate

How do I associate a button with a function andn still have it display text, click to calculate,and start a function in JavaScript
VIEWS ON THIS POST

51

Posted on:

Monday 19th November 2012
View Replies!

Server Side JavaScript compile errors

all. I am trying to write an SSJS application to process the submissions from a form on my website. I downloaded the Mono .NET compiler, which has a JScript.NET compiler in it. I believe JScript.NET is a superset of Javascript (and my host has a Javascript runtime engine) so this seemed appropriate. However, I'm getting compile errors from some very basic statements. For example: var file1 = 0; var success = 0; var first_name = "0"; var surname = "0"; var e_mail = "0"; var add = "0"; var feedback = "0"; file1 = new File("/logs/newsgroup.txt"); success = file1.open("a"); file1.close(); This brings up numerous errors starting with: /mnt/floppy/thanks.htm (1, 0) Error: msg.syntax Unhandled exception: System.Exception: must create expr stm with numerous errors.... numerous errors.... If anyone can point out my silly mistakes I would really appriciate it.
VIEWS ON THIS POST

53

Posted on:

Monday 19th November 2012
View Replies!

Is there a simpler way to do this?

I need to mimic what is going on in this sample with just javascript. This will only be used for mobile so I don't want to have to load the jQuery library and slow the user down. Can anyone suggest a simpler way to go about this http://jsfiddle.net/Q2bzT/
VIEWS ON THIS POST

86

Posted on:

Monday 19th November 2012
View Replies!

Changing GWT TreeItem color

I am using Google Web Toolkit (GWT) to implement a dynamic tree. One of the things I need to be able to do is to use color coding to denote different types of items within the tree. I have CSS styles set up for each color. However, when I try applying the CSS style using treeItem.addStyleName(styleName), the text color will not change if the tree item has children. Can anybody help me out with this I really need to be able to set the color of each tree item's text, whether it has children or not.
VIEWS ON THIS POST

50

Posted on:

Wednesday 21st November 2012
View Replies!

Modify CoDrop's interactive twitter map for #hashtags instead of u

http://tympanus.net/...ive-google-map/ ! I am new to javascript & apis. I saw this cool open source code and I want to be able to edit it. Instead of placing twitter users on a map, I want to place tweets with a specific hashtag. Any advice
VIEWS ON THIS POST

65

Posted on:

Wednesday 21st November 2012
View Replies!

parse query string in href function?

Im trying to rewrite a link with a href function. I need to parse a query string within it ('+tid') But all attempts Have falied. The current onclick/ link function Who Posted is attached to my forums 'replys' number colum in forum veiw' {i have no direct access} it appears in the staus bar on hover as Who Posted where '428 is the tid (topic id). I want to write a href link to do this (elsewhere in html) and add the tid of whatever topic the page is currently on. see site for clarification (click the 'replies' number next to a title) http://inny.ipbfree....phpshowforum=1 click on any topic, and see a mail href link above. I want to add the who_posted function href there, so that whatever topic your on, the who posted box will work. code is {no direct access} Im not sure to write the new link to include the extra function of adding the topic id (tid) i tried a few variations on
VIEWS ON THIS POST

69

Posted on:

Wednesday 21st November 2012
View Replies!

How to show an image only if theres something in the variable

Hi I'm trying to figure out how to show an image in a div in a certain order (but only show if the variable that corresponds for that image has something in it). I basically need something like the following... And,
VIEWS ON THIS POST

76

Posted on:

Wednesday 21st November 2012
View Replies!

Grab all objects with a certain class and then do...

Ok. So I'm writing a jQuery plugin and want to know how to grab every object with a certain class name and then do something with them. Does this make sense. For instance: Then that would call a jquery function that would automatically add extra divs and really whatever I want. The rest I know how to do, I just don't know how to call them.
VIEWS ON THIS POST

68

Posted on:

Wednesday 21st November 2012
View Replies!

I Need Help Please

i tryed to make a extra part of my send message script such as send message persons name subject but it had no subject so i tryed to insert one and it didnt come to plan, i then deleted the code i just made and the send messege page doessent work ill insert the script in here...
VIEWS ON THIS POST

40

Posted on:

Thursday 22nd November 2012
View Replies!

Function( confusion

I'm a C++ programmer attempting to learn some basics of Javascript. The following line is confusing me... GDownloadUrl("/test.aspx", function(xmlData, responseCode) .... with respect to the 2nd parameter in the method - 'function(xmlData' What does this syntax mean exactly I ...
VIEWS ON THIS POST

44

Posted on:

Thursday 22nd November 2012
View Replies!

Animate

i would like to make the image of the kangaroo appears to hop up and down across the screen. Kangaroo var kangaroos = new Array(11); var cur Kangaroo = 0; var direction; var begin; kangaroos[0] = "kangaroo0.gif"; kangaroos[1] = "kangaroo1.gif"; kangaroos[2] = "kangaroo2.gif"; kangaroos[3] = "kangaroo3.gif"; kangaroos[4] = "kangaroo4.gif"; kangaroos[5] = "kangaroo5.gif"; kangaroos[6] = "kangaroo6.gif"; kangaroos[7] = "kangaroo7.gif"; kangaroos[8] = "kangaroo8.gif"; kangaroos[9] = "kangaroo9.gif"; kangaroos[10] = "kangaroo10.gif"; function bounce() { if (cur Kangaroo == 10) cur Kangaroo == 0; else ++cur Kagaroo; document.getElementsByTagName("img") [0].src = kangaroos[curKangaroo].src; if (cur Kangaroo == 0) direction = "up"; else if (cur Kangaroo == 10) direction = "down"; document.getElementsByTagName("img") [0].src = kangaroos[Kangaroo]; } function startBouncing() { if (begin) clearInterval(begin); begin = setInterval("bounce()", 90); }
VIEWS ON THIS POST

48

Posted on:

Friday 23rd November 2012
View Replies!

Icelandic language messed up in javascript alert box

i have an alert box which i want to show some icelandic text but its not showing it function check() { alert("\t verur a vera skr\t/ur inn til ess a senda skilabo"); } it is showing the alert box but the text is messed up :( Žś veršur aš vera skrįš/ur inn til žess aš senda skilaboš any help please :(
VIEWS ON THIS POST

60

Posted on:

Saturday 24th November 2012
View Replies!

dynamically set unrelated dropdowns based on selection

Hi I'm looking for ideas or suggestions about how to implement this feature. The concept is I have 2 dropdown select boxes, with data that is not directly related (in the sense that there is no identifiers or foreign keys or anything within the data itself) but that have a logical relationship (although some data may not correlate to anything). The dropdowns are populated from a database via ASP.NET, and I need to be able to select a value in dd2 based on the user selection of dd1. I am hoping to do this in javascript so as to avoid the need to postback whenever the selection changes. Example data set; dd1 dd2 | relationship -----+------+--------------- A W | A -> X B X | B -> Z C Y | C -> Y D Z | E -> W E | F -> Z F | I am thinking at this point that I will have to dynamically generate the javascript with a large array defining the relationships and check through it upon dd1 selection. My question is, is there a more efficient way of doing this Can I set javascript events on the list items themselves, and would that be better How would you approach finding a solution to this problem
VIEWS ON THIS POST

116

Posted on:

Saturday 24th November 2012
View Replies!

When a div is hovered, how to make the hover stay?

I am not sure if this is possible in css or it's a javaScript thing. I have a page where it has many images, If you hover over the image the details of that image appear to the top left. However when the images are over next to the left hand side of the page, they disappear off screen. Which is annoying, as you can't read it. So i want to get it to either go right or left, up or down, depending on where the edge of the browser window is. If someone could point me in the right direction or if they have a script they use to do this, I'd much appreciate it. Cheers, Qwaz
VIEWS ON THIS POST

50

Posted on:

Sunday 25th November 2012
View Replies!

Is what i need possible

Hi all Firstly may i say i have found your forums to be of great help, but I have a task and not entirely sure if its possible I have a shoutcast radio that i have displaying on my shoutbox every 3.5 mins (auto refresh) but someone said what i need may be done with Javascript but hes as useless as me when it comes to Javascripts lol. My friend said he thinks it may be possible to program the code i have to encorporate a onChange command that automatically when a song has finished and new one started & finished it recognises that the song has changed and runs the code i need to display the song in a shoutbox. now heres the difficulty Details are obtained via a xml file of which then a php code reads from this i.e on my code $song[0] is the current one being played which auto changes this to $song[1] when its played. is what i need possible if you need copies of my file i would be more than happy to post.
VIEWS ON THIS POST

80

Posted on:

Sunday 25th November 2012
View Replies!

Saving A File To The Hard Drive

I am working on a project in which I will have to generate a .html file and save it to the user's hard drive. Please help me.
VIEWS ON THIS POST

44

Posted on:

Monday 26th November 2012
View Replies!

ajax framework with drag and drop auto arranging grid?

I'm new to the UI side of AJAX, and I was wondering if there was any AJAX framework (or an extension to the framework) which has the functionality like this: http://tool-man.org/examples/sorting.html (scroll down to the section "Example: Sorting in two dimensions")
VIEWS ON THIS POST

99

Posted on:

Monday 26th November 2012
View Replies!

Dynamically loading JS into iFrames - preventing IE7 popups whenleaving/entering secure connection

I have a webpage where Im creating AJAX type requests by loading dynamic pages containg JavaScript into hidden iFrames. The reason I am opting for this method over XmlHttpRequest object requests is because I wish for some of my ...
VIEWS ON THIS POST

61

Posted on:

Friday 30th November 2012
View Replies!

Two onchange events not working? - JavaScript Help

I have two events which i want to call in select while onchange I am uing this but its not working........
VIEWS ON THIS POST

197

Posted on:

Friday 28th December 2012
View Replies!

MOVED: good books on jquery? - JavaScript Help

This topic has been moved to Miscellaneous.http://www.phpfreaks.com/forums/index.phptopic=343577.0
VIEWS ON THIS POST

126

Posted on:

Friday 28th December 2012
View Replies!

building a url from explode function and getting page title to make new url? - JavaScript Help

As i see it this should be an easy one.. Im using the addthis shareing script to share a page url on multiple platforms... My problem is that i have sef urls and also a seperate fast search page where profiles are called up via search. These profiles are called in an iframe and the url is then notadd sef any longer but the standard url... What i need to do is build the sef url from the server request uri and then add the page title which is also the profiles name to the new url---i can do everything to build the url, but i do not know how to pull the page title one thing to note is that the page being shared is in an Iframe, i dont think this is a big problem as the script to share is also on the page which appears in the iframe..here is the addthis shareing script which calls to the url: addthis_pub = \'davidp13\'; '; }here is an example of the url and the result i need for the sef url equivalent: current link no sefhttp://www.xxxxxxxxx...ile&profileid=1Sef result needed to fill the [URL] above:http://www.xxxxxx.co...nersname/1.htmlthe "1" is the profile owners profile id i can pull this from the url above, the viewprofile is a standard word in the url, but the profile owners name is by default also the PAGETITLE.which doesn't show in the non sef link..any ideas how to pull the pagetitle and add it to the new url before it is passedbest regardsAntony
VIEWS ON THIS POST

124

Posted on:

Friday 28th December 2012
View Replies!

Php with Jquery (SELECTING) - JavaScript Help

How do you SELECT * FROM table WHERE field='(a jquery value)' I want to know is to know what gender they clicked on so I could run this query:SELECT * FROM table WHERE gender='whatever they clicked';Here is my Javascript code: $(document).ready(setupBeginning); function setupBeginning() { $("#rest").hide(); $(".femaleTrigger").click(showRestFemale); $(".maleTrigger").click(showRestMale); } function showRestFemale() { $("#rest").show(); $("#gender").hide(); } function showRestMale() { $("#rest").show(); $("#gender").hide(); } $(function() { $( "#tabs" ).tabs(); }); Now here is my HTML code: Click on your gender: Male Female Base Eyes Mouth Nose Hair Bases here. Eyes here. Mouths here. Noses here. Hairs here. Now I want to use PHP toSELECT * FROM tablename WHERE gender='whatever they clicked';How would I receive the data of what gender they clicked on
VIEWS ON THIS POST

122

Posted on:

Friday 28th December 2012
View Replies!

javascript/jquery detect user scroll 200px from bottom of page - JavaScript Help

I have a page that loads older comments when you scroll to the bottom of the page, it works well however I want it to load the comments when the user has scrolled to around 200px up from the bottom of the page (so they have a chance to load to help keep the user scrolling down smoothly without breaks from it loading).currently using:$(window).scroll(function () { /* if ($win.scrollTop() == 0) ///scrolled to page top*/ if ($(window).height() + $(window).scrollTop() == $(document).height()) { //code to be executed } });
VIEWS ON THIS POST

100

Posted on:

Friday 28th December 2012
View Replies!

JQuery hidden adjacent div issue - JavaScript Help

, I am just starting to get into jQuery and I have run into a problem that is annoying the hell out of me. I have a menu with all the main options for the site. However, this site is part of a large network; so I need to include an option for the global nav for the network. The current menu for the site is so: Home About Archives Contact Subscribe to RSS I didn't write this page, just going in to add the global nav. Anyway, I modified the menu as such and added the following under it: +/- Home About Archives Contact Subscribe to RSS writeTopGlobal_transition(); writeBotGlobal_transition(); $(function() { $('.hiddenNav').hover(function() { $('.globalNav').show(); }); $('.globalNav').hover(function() {}, function() { $('.globalNav').hide() }); }); The two functions in hidden div basically do a document.write of the global nav (which is fairly extensive). Anyway, here is my issue. As you can probably guess with my code I want the global nav to appear when a user hovers over the "+/-" link in the main menu. Then I need it to stay active as long as they are over it. Currently, this works fine. The global nav goes away when they move their mouse off of it. However, during testing I noticed my issue. If you just hover over the "+/-" and never go to the global nav section it stays open. I need it to act much like a drop down in that if the user hovers over the "+/-" the nav shows up and if they move it goes away....unless they move to the nav where it should stay up until they move off of it
VIEWS ON THIS POST

119

Posted on:

Friday 28th December 2012
View Replies!

jQuery/JavaScript trigger on canvas image load - JavaScript Help

Edit: after re-thinking and reading my post: Short question is: how do you add an Event listener on the img loading inside a canvas $("canvas img") doesn't work for example... , using jQuery and Javascript... I have a function that adds a line, when this line is added, another function is run that adds a Canvas and loads an image within it like so:Within addCanvas an image is loaded and I can trigger a function upon the image loading.. Cool. But how do I get the previous function to know when this image is loaded I tried adding return true; within addCanvas and then in the previous function doing an if(addCanvas()){ } but it seems to get to that line and if the image hasn't loaded, it doesn't wait function addText(){ // Add text code addCanvas(); } function addCanvas(){ // add canvas, load image var $img = new Image(); $img.src = 'image.png'; $img.onload = function(){ // do stuff } } I wanted the previous function to know when it has loaded so I can continue with all the variables I currently have... If I can't check for it in the previous function then I'll have to pass them all when they're only needed in certain conditions and its a little messy.It's a canvas but can't really do$("canvas").load(function(){ // loaded });because the canvas is already loaded... its the image inside it I want to check that has loaded
VIEWS ON THIS POST

116

Posted on:

Monday 31st December 2012
View Replies!

preloading quicktime movies. - JavaScript Help

is there any way to preload quicktime media before the user decides to view it.i know for images i can do this:var images = new Image;images.src = 'location.gif';can you do that for other media as well\t
VIEWS ON THIS POST

135

Posted on:

Monday 31st December 2012
View Replies!

Hash URL based website. load pages with multiple variables in url. etc. - JavaScript Help

I have a website that is completely hash based. It only ever loads one page the whole time you're on the site. The rest of the pages are loading in with ajax. What I am using to check for hash changes is $(window).hashchange( function (){}); and everytime the hash changes it loads the page that it tells it to based on whats in the hash. Now. This works perfectly fine when i just have one variable in the url that needs to load the page, however when i want to have a tabbed navigation inside of the first page that loads it either has to load the entire page again. (which would make this completely pointless if I kept it like this), or i cannot pass a url in the hash, (which wouldn't work because if you reload the page it wouldn't automatically go back to that tab and everything. So what I need is a better system in how i get pages through the hash. Okay to make it more clear as to what I am looking for I'll show some examples.example hash with only one page needing to be loaded.www.mysite.com/index.php#!/profile&id=1This will load the php page called profile.php, with the users ID as number 1. now, when you click on a tab on the users page the url would look something like this:www.mysite.com/index.php#!/profile&id=1&tab=informationThis will load information.php into a div inside of the profile.php page without reloading the profile page. (Well I mean that's what i want it to do)Could anyone give me some direction in how I could accomplish this.
VIEWS ON THIS POST

131

Posted on:

Monday 31st December 2012
View Replies!

how to highlight table row on select? - JavaScript Help

hi . as stated in my question above, i want to be able to highlight a table row when i click on it and unhighlight when i click on another row. i'm totally new to javascript and jquery so i don't know where to begin. i've used php also on this one to display the records in the table. hope you can help. just tell me if something is lacking in the code i've posted or if i need to post javascript. here's the html&php code.. Records - of  Reset ID Course Year Block
VIEWS ON THIS POST

119

Posted on:

Monday 31st December 2012
View Replies!

Combo Box value to php variable - JavaScript Help

Select Size: S M L XL
VIEWS ON THIS POST

99

Posted on:

Tuesday 1st January 2013
View Replies!

jQuery - show or hide div based on select menu option. - JavaScript Help

Hi ,I need to be able to show a new form field based on an option selected in the select menu. The show works fine, but when I select another option the revealed form field (div) won't hide. Any ideas $(document).ready(function(){ $("#parent1").css("display","none"); $("#reveal_add").click(function(){ if ($('option[name=add_mfr]:selected').val() == "add_new" ) { $("#parent1").slideDown("fast"); //Slide Down Effect } else { $("#parent1").slideUp("fast"); //Slide Up Effect } }); });
VIEWS ON THIS POST

88

Posted on:

Tuesday 1st January 2013
View Replies!

Multiple instances of TinyMCE - JavaScript Help

Hi all, ive installed tinymce on my website only on a page with multiple textareas it isnt showing, it only shows on the first area, Ive googled this and found nothing in the wiki documentation, has any idea why my javascript for tinymce is tinyMCE.init({ // General options mode : "textareas", theme : "advanced", // Theme options theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,bullist,numlist,|,outdent,indent,blockquote,forecolor,backcolor,link,unlink", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, // Example content CSS (should be your site CSS) content_css : "css/example.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "js/template_list.js", external_link_list_url : "js/link_list.js", external_image_list_url : "js/image_list.js", media_external_list_url : "js/media_list.js", // Replace values for the template plugin }); and my textarea's are all similiar too
VIEWS ON THIS POST

89

Posted on:

Tuesday 1st January 2013
View Replies!

print another page without window popup. - JavaScript Help

Hi all,I want to print a page from another page. I have a master page with links to other page. When I click "print," it should print the another page.The function window.print() is printing only the active page. So on click print i am opening a new window.In the onload event of the target page i have usedEventhough it's working, at the same time the window is also popping up behind the printer set up screen. when i click print or cancel the window gets closed automatically.i don't want the window to pop up. Do suggest me if there is any other alternative way.
VIEWS ON THIS POST

84

Posted on:

Tuesday 1st January 2013
View Replies!

MOVED: breaks jQuery accordion - JavaScript Help

This topic has been moved to CSS Help.http://forums.phpfreaks.com/index.phptopic=363968.0
VIEWS ON THIS POST

64

Posted on:

Tuesday 1st January 2013
View Replies!

question about javascript - JavaScript Help

I'm not really sure what to put as the subject, but anyways I have this javascript that runs when i click an edit button, just calls the edit() function and what I want it to do is place an edit button next to every element that is an input, textarea, img, and label. the script itself works fine, but the html that i'm having it place the edit buttons next to is being displayed by a php function. So what i think is the problem is that the javascript wont read the html that is being displayed by the php function since it reads the html first and finds that nothing matches or something if this is the problem how might i go about to fix itHere is the javascript: var count = true; document.getElementsByAttribute=function(attrN,attrV,multi){ attrV=attrV.replace(/\|/g,'\\|').replace(/\[/g,'\\[').replace(/\(/g,'\\(').replace(/\+/g,'\\+').replace(/\./g,'\\.').replace(/\*/g,'\\*').replace(/\/g,'\\').replace(/\//g,'\\/'); var multi=typeof multi!='undefined' multi: false, cIterate=typeof document.all!='undefined' document.all: document.getElementsByTagName('*'), aResponse=[], re=new RegExp(multi '\\b'+attrV+'\\b': '^'+attrV+'$'), i=0, elm; while((elm=cIterate.item(i++))){ if(re.test(elm.getAttribute(attrN)||'')) aResponse[aResponse.length]=elm; } return aResponse; } function edit() { if(count) { // Get all input elements into an object var inputs = document.getElementsByTagName('input'); // Loop through inputs for( var i=0; i
VIEWS ON THIS POST

104

Posted on:

Tuesday 1st January 2013
View Replies!

Menu Bar - JavaScript Help

im using a script i found online to generate a menu bar and it works great except for every time you navigate to a different page it shows the menu as the unordered list before anything else loads and i was wondering how to stop this from happening
VIEWS ON THIS POST

121

Posted on:

Wednesday 2nd January 2013
View Replies!

help with getElementById.. - JavaScript Help

why doesn't change the image height after I click the buttonfunction addBorder(){document.getElementById("html5_logo.jpg").style='height:500px';
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

[jquery] show only 1 at a time & cancel - JavaScript Help

http://jsfiddle.net/AndyPSV/5VXcp/2/I WANT.1. it could open only 1 edit at the time2. if something has been modified, then it prints message (& the user click to open another tab): http://jsfiddle.net/9sxwN/106/ , and then a) closes last edit b) opens new edit (off course after approval that he wants to lost data, if not: don't does anything)3. cancel does not refreshes page, but only closes the last di
VIEWS ON THIS POST

65

Posted on:

Wednesday 2nd January 2013
View Replies!

jQuery issues? - JavaScript Help

I am following the tutorial here: http://www.scriptbre...rtical-tab-menuHowever, when I include the jQuery function into an external file and include that, it doesn't work, but when it's in the head of the file it works perfectly. What could be wrong
VIEWS ON THIS POST

60

Posted on:

Wednesday 2nd January 2013
View Replies!

Follow page API (Not User) - JavaScript Help

Is there a way to implement a follow this page Twitter API (Similar to Like this Page that facebook has).
VIEWS ON THIS POST

68

Posted on:

Wednesday 2nd January 2013
View Replies!

Why wont return false disable enter? - JavaScript Help

I am trying to disable the user from being able to go to a new line in my text area. Why doesn't return false work if (is_key(event, 13) && (with_field.value.length > 1)){ var search_list_ele_array = new Array(); var search_list_ele_array = document.getElementById('with_auto').getElementsByTagName('li'); for (j=0; j
VIEWS ON THIS POST

64

Posted on:

Wednesday 2nd January 2013
View Replies!

Inconsistent javascript output - JavaScript Help

I'm having problems with my scripts. Javascipt output is inconsistent. What i mean is that if i'm accessing the system on my machine, the system outputs the correct figures. But when it is accessed using another machine, incorrect figures are displayed. We are all using google chrome so i guess the browser is not the issue. Javascript is enabled. The operating system might be the issue but im not sure. The system is launched at brinkster.comhere are the codes:
VIEWS ON THIS POST

53

Posted on:

Wednesday 2nd January 2013
View Replies!

Javascript that detects class - JavaScript Help

Hi ,I have this img classnow what I need is to change toe onmousedown event so that it has an additional IF, the additional IF needs to check if class="online" or their is no class.Cheers in advance, tried googling couldn't find what I was after. help much appreciated,
VIEWS ON THIS POST

72

Posted on:

Wednesday 2nd January 2013
View Replies!

help on the select box calcualtion - JavaScript Help

any one can help me on this code the problem on this code is that it only give me the result of the last mutification (chassis.value * Quantity1.value). I want to get the result of motherboard.value * Quantity + Chassis.value * quantity1. anyone know how to fix this problem. I appreciate it. function calculate(){ document.calcform.total.value = parseFloat(document.calcform.Motherboard.value || 0) * parseFloat(document.calcform.Quantity.value || 0) + parseFloat(document.calcform.Chassis.value || 0) * parseFloat(document.calcform.Quantity1.value || 0) } here are the code on my page. .SelectClass { font-size: 15px; } table { font-size: .9em; border: 3px groove; padding: 0px; background-color: #dddddd; } .mycss { font-weight:normal;font-style:italic;color:#000000;letter-spacing:1pt;word-spacing:2pt;font-size:36px;text-align:left;font-family:courier new, courier, monospace;line-height:1; } function dp(price) { string = "" + price; number = string.length - string.indexOf('.'); if (string.indexOf('.') == -1) return string + '.00'; if (number == 1) return string + '00'; if (number == 2) return string + '0'; if (number > 3) return string.substring(0,string.length-number+3); return string; } function calculate(){ document.calcform.total.value =dp(parseFloat(document.calcform.Motherboard.value|| 1)* parseFloat(document.calcform.Quantity.value || 1)+parseFloat(document.calcform.Chassis.value|| 0)* parseFloat(document.calcform.Quantity1.value || 0)) } Order List $ Product Name Quantity [attachment deleted by admin]
VIEWS ON THIS POST

70

Posted on:

Wednesday 2nd January 2013
View Replies!

Add Class to DropDown - JavaScript Help

Basically I have a dropdown that appears on hover. When it an category in the dropdown is selected I want to add a class. When another item in the list is selected I want to remove the previous class and add the same class to the new dropdown item.I know this doesn't work, but am I on the right track var drop_selected = document.getElementsByName('search_catergory'); drop_selected.onchange = function(){ drop_selected.setAttribute("class", "drop_selected"); } HTML below: People Companies Inbox
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

Change Background Color with Checkbox on an Order Form - JavaScript Help

I have a custom order form that we are working on formattinghttps://secureorderc...em/swmorder.phpIn the "upgrade and save" box - it switches the order form ID's and changes the price of the product when they upgradeIn addition to the checkbox which upgrades their order, I also want the checkbox click to change the background color of from #FFC0CD to #7DFF9C Then when they unclick the checkbox - it returns the background color to #FFC0CDWhile still maintaining the order form upgrade functionalityIs there another onclick function that I can add
VIEWS ON THIS POST

66

Posted on:

Wednesday 2nd January 2013
View Replies!

Lightbox issues - JavaScript Help

I'm having trouble making lightbox work. I was told on the Wordpress forums that it's because the theme has a ton of script errors..Here it is:Any advice on how to clean it up\t Totally new to this stuff
VIEWS ON THIS POST

88

Posted on:

Wednesday 2nd January 2013
View Replies!

jquery can not select multiple .siblings - JavaScript Help

I am new to JQuery and can not get the code below to select multiple siblings, If I remove the siblings for "label" and "#TrsAssignmentName" + nextIndex + "Risk" it works fine\t\t$(".removeEmployee").live("click", function(removeEvent){ removeEvent.preventDefault(); allEmployees = $(".employee", $("#employees")); index = allEmployees.index($(this).closest(".employee")); nextIndex = index+1; while (allEmployees[nextIndex] !== undefined) { $(allEmployees[nextIndex]) .children("#TrsAssignmentName" + nextIndex + "EmployeeNumber") .attr({ "id" : "TrsAssignmentName" + (nextIndex-1) + "EmployeeNumber", "name" : "data[TrsAssignmentName][" + (nextIndex-1) + "][employee_number]" }) .end() .children("#TrsAssignmentName" + nextIndex + "GcStaffNumber") .attr({ "id" : "TrsAssignmentName" + (nextIndex-1) + "GcStaffNumber", "name" : "data[TrsAssignmentName][" + (nextIndex-1) + "][gc_staff_number]" }) .siblings(".input") .children("label") .attr({ "for" : "TrsAssignmentName" + (nextIndex-1) + "EmployeeName" }) .siblings("input") .attr({ "id" : "TrsAssignmentName" + (nextIndex-1) + "EmployeeName", "name" : "data[TrsAssignmentName][" + (nextIndex-1) + "][employee_name]" }) .siblings("label") .attr({ "for" : "for": "TrsAssignmentName" + employeeIndex + "Risk" }) .siblings("#TrsAssignmentName" + nextIndex + "Risk") .attr({ "id" : "TrsAssignmentName" + (nextIndex-1) + "Risk", "name" : "data[TrsAssignmentName][" + (nextIndex-1) + "][risk]" }) .end() .end() ; nextIndex++; } $(this).closest(".employee").slideUp(250, function() { $(this).remove(); }); });
VIEWS ON THIS POST

62

Posted on:

Wednesday 2nd January 2013
View Replies!

javascript instance update - JavaScript Help

So I'm writing a javascript code that will control a quicktime video. To do this I'm using the quicktime plug in. One of the tools provided to me is variable that always contains the current time/position of the video. I want to write a script that will show that value in a text field. Does any know of a way I can update that value in real time
VIEWS ON THIS POST

71

Posted on:

Wednesday 2nd January 2013
View Replies!

Help with Javascript on homepage - JavaScript Help

, I have a script running on my homepage and i would like it to be identical for all people at the same time. Meaning the script runs fins when i open the site. then another user opens the site and the script runs fine for them but it is not in sync. how can i sync it so we are both viewing the same instance of the script.I think that makes sense, if not let me know and i can try to explain differently
VIEWS ON THIS POST

75

Posted on:

Wednesday 2nd January 2013
View Replies!

this.type=password - JavaScript Help

I have a text field, and when a user clicks on it, it turns into a password field.to accomplish this, I have this in an onfocus method in the input:This works perfectly fine in Firefox, but in Internet Explorer, I have an error message saying: Quote Could not get the type property. This command is not supported.How can I fix this in Internet Explorer , still not solved , genius,
VIEWS ON THIS POST

85

Posted on:

Wednesday 2nd January 2013
View Replies!