Body onkeypress - JavaScript Help




I want to display a messgae (alert) whenever anyone click space in my webpage. Now, is there any way to do this other than putting the onkeypress in BODY tage Can I put onkeypress in any other place and have the same result
Posted On: Wednesday 2nd of January 2013 12:38:56 AM Total Views:  299
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Problem related to JSP and Javascript

I have designed a Registration form with the help of HTML. Here in the tage I have given the action to the JSP page. (e.g. ) . I have to validate this form bu javascript. The form is validated on clicking the Submit button of the form. But the problem is that here the validation is done but at the same time the form is directed to the next page i.e. to sample.jsp I wish that the form must be directed to the next page when all the validation is successful and the user does not need to change anything on the form., Is the name of the function validate() here\t Plzz expplain it.. You need to control the form submission based on the result of the validation. where validate returns a true or false depending on the outcome of the validation.
VIEWS ON THIS POST

54

Posted on:

Monday 19th November 2012
View Replies!

Quadratic Equation Solver

, I have developed a simple facebook app that solves quadratic equations using javascript. Please, i am requesting you to judge it and correct me wherever I have gone wrong. Quadratic Equation Solver
VIEWS ON THIS POST

54

Posted on:

Wednesday 21st November 2012
View Replies!

Inserting XML in IE8

Is there a way to do this easily I found out that for Internet Explorer, html and xml elements are incompatible as far as the DOM goes. The following code only works with DOM-compliant browsers: var xml = ajax.http.responseXML.documentElement; document.getElementById('someId').appendChild(xml); //IE Error: No such interface supported Is there a IE workaround for this that DOES NOT involve recreating the xml
VIEWS ON THIS POST

56

Posted on:

Wednesday 21st November 2012
View Replies!

shopping cart jsp servlet

hi iwant jsp servlet shopping cart any one ...i want to give my asignment plz any one had that please sent to me urgent my submision date is 20th aug...plz...plz...pzlllz adnin soo sorry
VIEWS ON THIS POST

136

Posted on:

Wednesday 21st November 2012
View Replies!

IE innerHTML doesn't inherit script tags [SOLVED]

I'm making remote calls to PHP files to populate div's in my webpage. The code I'm using is pretty standard stuff for this: var xmlhttp; function pageView(str) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support XMLHTTP!"); return; } var url="includes/" + str; url = url + "sid="+Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { var main = document.getElementById("mainWindow"); main.innerHTML = xmlhttp.responseText; alert(xmlhttp.responseText); var scripts = main.getElementsByTagName("script"); alert(scripts.length); for(i=0; i
VIEWS ON THIS POST

91

Posted on:

Wednesday 21st November 2012
View Replies!

Please Correct My code

actually i want to compare pass1.value with pass2.value...dis is my code please check it.. function myFunction() { alert " pass1.value"; var x=document.getElementById("pass1").value; var y=document.getElementById("pass2").value; if(x == y) { alert "password matches"; } else { alert "password dosn't matches"; } } Password: Re-Type Password:
VIEWS ON THIS POST

41

Posted on:

Saturday 24th November 2012
View Replies!

JavaScript/HTML passing info from one form to another

Hi..I am a newbie in JavaScript.I have two forms (in two different webpages) all with radio buttons. A user cannot select more than one option from each form. My plan is to pass the user input from both the forms to a perl script which would then query a MySQL db for the output and display it. Now my question is, is it possible to pass the data from first form to second using GET/POST method in Radio form Will it be possible to pass both data from first and second form to the Perl code My first form page named as index.html page and the second one is named as party_names.html. The form code I used in the first index.html page is: I have a JavaScript function to validate form data so that it can check whether a radio button is selected after clicking next button to go to next html form page. Please suggest. Many
VIEWS ON THIS POST

321

Posted on:

Saturday 24th November 2012
View Replies!

Downloading content from Video JS Player?

It is a very interesting question about downloading flash files embeded in Video JS from HTML 5 standart. Here we have 2 flash pages. 1: http://resursi.e-edu.bg/content/math3/runtime/rtleo/scorm-flo.htmlsco=../../content/uc_m5_l008.flo&width=788&height=553&recording=true 2. http://resursi.e-edu.bg/content/s1/runtime/rtleo/scorm-flo.htmlsco=../../content/uc_s3_l093.flo&width=788&height=553&recording=true As you see we have different id's uc_m5_1008 and uc_s3_1093; Interestingly we have .flo format! and video js in a script file. Also there are 2 swf files (using ctrl + f on Google Chrome can help you find them)but downloading them with mozzila does nothing.
VIEWS ON THIS POST

305

Posted on:

Saturday 24th November 2012
View Replies!

input tags outside form tags

First name: Last name:
VIEWS ON THIS POST

131

Posted on:

Saturday 24th November 2012
View Replies!

How do I translate home videos to HTML script to embed?

I have alot of home videos I want to put on my website, and it seems that the easiest way to do it would be to embed it onto my website using HTML script. Problem is, I have no clue how to convert in into HTML script. Could someone please tell me how
VIEWS ON THIS POST

154

Posted on:

Saturday 24th November 2012
View Replies!

Phone apps

Hi ! My questions for the day are: Has anyone here used Wakanda studio/server to make a native app for smartphones if yes or know anything about it, Give us an insight please. Do you know any free and easy to use studio that lets you develop native apps using web technologies like HTML5, javascript, php Thank you.
VIEWS ON THIS POST

149

Posted on:

Monday 26th November 2012
View Replies!

Javascript LOCATION constructor

INTRODUCTION The W3C's Window Object 1.0 specification (Working Draft dated 07 April 2006 at the time of writing) defines in it's Location Interface section a set of attributes (or fragments) by which a Location object may be addressed. Despite the draft status of this document, many implementations of javascript have provided such an interface for many years. The Location attributes .href and its fragments [.protocol, .hostname, .port, .pathname, .search, .hash] are all read/write. Whilst reading is reasonably reliable across various browsers (there are some small differences in the detail of what is returned), some (principally IE6) fail to implement the writing of fragments correctly. A garbled href can result! For example: var foo = window.location.search; is (reasonably) reliable. window.location.search = 'a=500'; is not reliable in all browsers. Some fragments are more reliably written than others and success can depend on the presence/absence of other fragments.SOLUTION The javascript constructor (class) LOCATION, below, maintains its own public location fragments and composite href and an underlying instance of javascript's built-in Location object. The public fragments can be read and written independently of the underlying Location until such time that an optional "commit" instruction causes a full href to be built from the fragments and sent to the underlying Location. Apart from "commit", a range of methods is included for setting the whole href, building/amending a location by individual fragment(s), for returning a complete href string and for returning a link, complete with href, ready for insertion into a document with or without further processing (such as adding a classname or target using DOM methods). INSTALLATION Save the code to a file, location.js , then include it in the head of any page that needs it with: .INSTANTIATION There are four forms:new LOCATION(locationObject); In this form, LOCATION seeds its public fragments from the native Location object passed as a parameter. When committed, changes to the internal href or its fragments directly affect the external Location object. This form can be used for directly manipulating the window.location object, for example to go to a named anchor by setting window.location.hash. Examples: var foo = new LOCATION(window.location); var foo = new LOCATION(opener.location); new LOCATION(DOM_link); In this form, LOCATION uses the passed hyperlink () object as its underlying Location. When committed, changes to the internal href or its fragments directly affect the external hyperlink. This form can be used for building/modifying the href of a pre-created link. Examples: var foo = new LOCATION(document.links[i]); . var foo = document.createElement('a'); foo.href="http://www.abc.com"; var bar = new LOCATION(foo); new LOCATION(href); In this form, LOCATION creates its own Location object and seeds it and the public fragments with the href string passed as a parameter. The new instance of LOCATION is thus initially independent of any external representation of the underlying Location. Examples: var foo = new LOCATION(window.location.href); var foo = new LOCATION("http://www.abc.com"); var foo = new LOCATION("subfolder/page.html"); var foo = new LOCATION("../subdirectory/page.html"); var foo = new LOCATION("/directory/page.html"); new LOCATION(); Example: var foo = new LOCATION(); In this form, LOCATION creates its own Location object and seeds the public fragments with nulls. This form can be used to build from scratch an href string or DOM hyperlink () element. Whichever form is used, the current state of a LOCATION instance can be externalised by enquiring the property LOCATION.href, or calling the methods LOCATION.getLink() or LOCATION.inspect() (see below). API Properties LOCATION.href LOCATION.protocol LOCATION.host LOCATION.hostname LOCATION.port LOCATION.pathname LOCATION.search LOCATION.hash are public properties and can thus be enquired with eg. foo.protocol . Methods LOCATION.setHREF(href[, commitIt]) Description : Sets a LOCATION's href to href. href must be a string. It is not checked for validity. When true, the optional parameter commitIt causes .commit() to be called. Returns : true if committed, false if not committed. Example : foo.setHREF("http://www.abc.com"); .LOCATION.setFragments(frags[, commitIt]) Description : Sets those parts of a LOCATION's href specified in frags, which must be of the form { prop1:value1[, propN:valueN] }. When true, the optional parameter commitIt causes .commit() to be called. Returns : true if committed, false if not committed. Example : foo.setFragments({search:'q=17&name=Smith', hash:'education'}); .LOCATION.compose() Description : Builds a full href from LOCATION's stored fragments (.protocol, .hostname, etc). Called internally by other methods. Not normally called externally but can be called instead of enquiring the .href property. Returns : The composed href (string). Example : var bar = foo.compose(); .LOCATION.decompose() Description : Breaks an href down into its component fragments which are stored internally as public properties. Called internally by other methods. Not normally called externally. Returns : nothing Example : foo.decompose(); .LOCATION.commit() Description : Calls .compose() then commits the returned href to the underlying Location object. For instances of LOCATION created with form 1 or form 2 (see above) and those from which a link has been returned using .getLink(), the external Location object will be affected. Returns : True if committed; false if not. Example : var bar = foo.commit(); .LOCATION.getLink([commitIt]) Description : Returns a link in a form suitable for inserting into a document with eg. document.appendChild(). When true, the optional parameter commitIt causes .commit() to be called before returning the link. After returning a link, any subsequent call of .commit() will affect the returned Location object. Returns : A DOM element of the type document.createElement('a'), with its href set to the underlying Location object's href. Other attributes need to be set externally. Example : var bar = foo.getLink(true); LOCATION.inspect([wrapperID]) Description : Builds a tabulated representation of all fragments, the composed href and the underlying Location's href. When true, the optional parameter wrapperID causes the composed table to be displayed in an HTML block element (eg. div) identified with id="wrapperID". The table is given the attribute class="locationInspect" in case it needs to be styled with css. This method was originally included to help debug the constructor but left in as it may be useful to developers. Returns : (string) an HTML table. Examples : foo.inspect("myDiv"); var HTMLTableString = foo.inspect(); LIMITATIONS Like javascript's built-in Location class, LOCATION addresses only HTTP. It is not universally applicable to other URL protocols; finger, mailto, ftp etc. LOCATION is only semi-intelligent. When building urls, .compose() and .getLink() omit delimiters before null fragments. Other than that, it's rubbish-in-rubbish-out. In the (unlikely) event, at some time in the future, that javascript should incorporate a LOCATION object (capitalized) in is native code, then this constructor will need to be renamed. Only medium-intensity tested at the time of posting. May therefore be buggy. Suggest rigorous testing in target environment before deploying. RELATED SNIPPETS Javascript Query Parser CONCLUSION LOCATION offers a convenient way to build and manipulate Location objects, overcoming (subject to testing) shortcomings in some browsers' implementation of the "Location Interface". If you are developing uniquely for a browser version which correctly implements the "Location Interface" (ie. reliably writes url fragments), then there is no need to use LOCATION, though it may still be a handy tool for client-side dynamic url/link building rather than having to code up a lot of string handling for yourself. Comments and improvements welcome. Airshow
VIEWS ON THIS POST

140

Posted on:

Monday 26th November 2012
View Replies!

Javascript Progress Bar flickers


VIEWS ON THIS POST

53

Posted on:

Tuesday 27th November 2012
View Replies!

Remove tags from selected text in textarea - JavaScript Help

I want to add button that remove tags (remove formating) from selected text in textarea. Here is my code for adding BBCode tags between selected text:function formatText(el,tagstart,tagend) { if (el.setSelectionRange) { el.value = el.value.substring(0,el.selectionstart) + tagstart + el.value.substring(el.selectionstart,el.selectionend) + tagend + el.value.substring(el.selectionend,el.value.length) } else { } }Than I just add another function for tags:function AddTag(tag) { formatText(document.getElementById('textarea'),'['+tag+']','[/'+tag+']'); }And add tag button will look like:This button will add [ b] and [ / b] between selected text in textarea.I have tried this code but this remove all tags, not just for selected text:function deleteTags(){ var tags=[ '\\[b\\]', '\\[\/b\\]', '\\[url\\]', '\\[/url\\]', '\\[u\\]', '\\[\/u\\]' ] var my = document.getElementById('mytextarea'), i=0, reg, t; while(t=tags[i++]){ reg=new RegExp(t,'gi'); my.value = my.value.replace(reg,''); } }How can I add another button to remove all tags ( [ b] , [ u ], [ quote ] etc...), but from selected text
VIEWS ON THIS POST

70

Posted on:

Tuesday 27th November 2012
View Replies!

$.ajax is not defined - error

I am getting $.ajax is not defined with firebug - maybe missing bracets any ideas function get_place(jack) { $.ajax({ type: "POST", url: "fruit.php", beforeSend: function () { $("#city").html("Loading ..."); }, data: "cartowner="+cartowner, success: function(msg){ $("#city").html(msg); } }); }
VIEWS ON THIS POST

81

Posted on:

Sunday 23rd December 2012
View Replies!

Need a good source or a good tutorial on how to do page load data jquery. - JavaScript Help

I have looked up on the web for some good tutorials, so I haven't really found any "SIMPLE ONES". I'm looking for a good simple tutorial on how to make your page continue and continually load data when you scroll down the page. Will need ajax to pull some data from the database. I looked at 9Lessions tutorial on page load data jquery, but it's pretty complex. I tried to make it work in an example and it didn't work. But, all I'm looking for is a very simple tutorial on how to make a page load data jquery.
VIEWS ON THIS POST

167

Posted on:

Friday 28th December 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

279

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

185

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

172

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

202

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

162

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

177

Posted on:

Friday 28th December 2012
View Replies!

Very newbie question - about clicking on a square and having it change colour - JavaScript Help

Hi all,Sorry about the noob question but I have never programmed in Javascript (PHP and HTML :D ).I wish to have squares (3 wide by 3 deep), and when I click on a square the background colour changes (without reloading the page). Can this be done in Javascript\t and if so where should I go to learn how to do thisPlease don't post the answer as I wish to learn how to do it (if it can be done). Just a simple link to a page that shows me how to do it is fine.James
VIEWS ON THIS POST

105

Posted on:

Monday 31st 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

196

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

203

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

178

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

213

Posted on:

Monday 31st December 2012
View Replies!

FxSlide MooTools - JavaScript Help

After some foundation laying on the knowledge of JS I have decided (where appropriate) to use premade effects (primarily to same sve time at the moment).I found a nice Fx.Slide by MooTools which i have managed to integrate with little trouble...http://demos.mootools.net/Fx.SlideIs anyone familiar with MooTools, and if so... How can I get the slide to load up in the closed status. Basically i want the user to click if they want to read more, not the other way around.I've tried playing around with the demo JS but with no success
VIEWS ON THIS POST

58

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

172

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

132

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

161

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

149

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

154

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

241

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

112

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

111

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

69

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

110

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

88

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

91

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

124

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

102

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

108

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

89

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

111

Posted on:

Wednesday 2nd January 2013
View Replies!

innerHTML - JavaScript Help

Hi i am using a javascript where if i select something in drop down it display me a value assigned to it, i wants to change a div content which has also a form, select options and buttons, when i tried like this it did not worked if(document.drop_list.SubCat.value == 'Mango'){ document.getElementById('selectedResult').innerHTML = " Amount 1000 "; } but it works if i put some simple words like this if(document.drop_list.SubCat.value == 'Mango'){ document.getElementById('selectedResult').innerHTML = "this works"; } how can i display all of those above
VIEWS ON THIS POST

43

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

94

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

119

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

88

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

105

Posted on:

Wednesday 2nd January 2013
View Replies!