Message from Woody W Most recent post: 10/27/2007 3 authors and 3 replies. how do I edit css using JAVAscript? Can anyone help? read more about how do I edit css using JAVAscript?
Message from Marcel Most recent post: 10/14/2007 3 authors and 3 replies. Hi, I use the following code in the 'head' to inlcude some functions: <script language="JAVAscript" type="text/JAVAscript" src="JAVAscript/toolbox.js"></script> and in the body I start one of those functions like this: <body onload="changefoto();"> But this doesn't work. When I put the code directly in my html page it works just fine. Who can help me? Thanks in advance Marcel read more about include problem.
Message from screechyboy Most recent post: 9/27/2007 2 authors and 2 replies. OKay so im new to JAVAscript Cookies.... I am able to set and return cookie values but I know want to create an if statement!One of my cookies is called "color" and I wish to write a script that displays a certain graphic if "Color" equals "White" for example.The code I have so far is... <script type="text/JAVAscript"> color=getCookie('color') if (color="White") { alert('Color = '+color+'!')}</script> The alert appears when the page loads but ignores the IF statement so just displays the value of "color" regardless of wether its value is "White".Im stuck and google searching is getting me knowhere, can this be done?Your help is greaty appreciated! read more about if cookie = ""
Message from Jon Maz Most recent post: 9/25/2007 9 authors and 68 replies. Hi, I have got a simple bit of code that successfully injects a JAVAscript alert into the DOM (confirmed by View Generated Source in Firefox), yet that alert isn't executed. QUESTION: Why does not it execute? QUESTION: Can I make it execute? <html> <body> <div id="myDiv"></div> <script> var myDiv = document.getElementById("myDiv"); myDiv.innerHTML = "\<script\>alert('foo');\</script\>"; </script> </body> </html> Thanks in advance, JON read more about How to make injected js execute?
Message from Paperhat Most recent post: 9/21/2007 10 authors and 27 replies. Hi there, I came across a website using this great effect displaying photos. I know it has to be JAVAscript, is there a ready-made script for it? http://cabellhuntington.org/features/photo_gallery/national_cancer_survivors_day/ Thanks in advance. Ed ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- read more about how do they do that?
Message from Yuri Shtil Most recent post: 9/9/2007 4 authors and 5 replies. I couldn't get any advice in c.l.JAVAscript. The following HTML code has a form with a submit and a select with a single option. Both the submit and the option have an onclick action that pops up an alert. Both actions work with Mozilla but only the submit action works with IE7. Any clues anyone? I tried to google this to no avail. ----------------- Code ----------------------------- read more about IE quirks, onclick doesn't work on option in select
Message from aroraamit81 Most recent post: 9/9/2007 3 authors and 4 replies. Hi, How to loop through HTML Table in JAVAscript, I want to check if any of check box in my HTML Table is checked or not. Thnx in advance Amit read more about Looping through HTML Table
Message from Homer Most recent post: 9/8/2007 2 authors and 2 replies. I'm writing the attached script as an academic exercise. The script is supposed to accept 5 numbers from a user, then tell that user how many negative numbers they entered, how many positive numbers they entered, and how many zeros they entered. This is an entry-level class so I'm sure it could be written more efficiently than I have done. Still, as it's written, it runs, but I get "NaN"s in place of numbers in my output. Can anyone tell me why? I included the lines: sn = parseInt( sumNeg ); sp = parseInt( sumPos ); sz = parseInt( sumZero ); To make sure my output is an integer (and not a string). Anyhow, here's my code: <?xml version = "1.0"?>Help! Why am I not seeing numbers in my output? Thanks! (p.s. I will give credit where credit is due in my class). read more about Help needed w/ basic script
Message from kieran.j.lee Most recent post: 8/7/2007 2 authors and 2 replies. I have several FCKEditor panels on the same ASP.NET 1.1 page. I am using the onblur and onfocus events of FCKEditor to collapse and expand the toolbar when the user places the cursor in or out of the editor panel. This is working great. However, since the toolbar is expanded, I'd also like to be able to expand the height of the current FCKEditor panel onfocus and then reduce the height again when leaving the Editor panel and collapsing the toolbar again. I have tried several variations of the code below to no avail. Has anybody had a similar experience and come up with a solution? <script type="text/JAVAscript"> function FCKeditor_OnComplete( editorInstance ) { editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ; editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ; } function FCKeditor_OnBlur( editorInstance ) { editorInstance.ToolbarSet.Collapse() ; editorInstance.Height = 200 ; } function FCKeditor_OnFocus( editorInstance ) { var oEditor = FCKeditorAPI.GetInstance(editorInstance.Name).EditorWindow.parent ; oEditor.Height = "1000px" ; editorInstance.ToolbarSet.Expand() ; } </script> read more about FCKEditor event handling
Message from Simon Most recent post: 7/20/2007 2 authors and 2 replies. I'd like to know if there is a way to display a progressbar while loading a page. (We developped our application in Caché (intersystems), some functions need some time to calculate&display data, in the mean time I do not want users to stare at an internet explorer in whitch nothing happens, I want them to see that something is happening and even better, the status of loading.) I saw on the internet that JAVAscript won't work because it has no insight to the bytes received. (But ok, I can do without that information.) I have tried to use an animated gif, (same gif you see when starting windows for example), or just the text: "please wait...", but then the problem is that although I can hide and show it through JAVAscript, it won't be shown before the page is completely loaded. In a script I show the text: please wait. In the body I use the onload-event to hide the text but that wont work because the script won't be executed before the onload event is triggered. I can not find a way to trigger an onbeforeload-event. (For the script that displays Please wait) Any ideas? Thanks, Simon read more about Progress bar
Message from David Most recent post: 6/20/2007 2 authors and 6 replies. I'm trying to add a date and time to an html form, but I'm having a bit of trouble getting it working. Any suggestions? Thanks! ~ David (merlin001_at_gmail_dot_com) read more about Adding Date/Time to an HTML form? - Request_Information_b.html (0/1)
Message from Paulo da Silva Most recent post: 6/8/2007 2 authors and 3 replies. Hi! I am learning JAVAscript and found the following problem: How do I create a form, not to be submitted, but to just change some "internal" JAVAscrip variables? For example: function testf() { v1=document.getElementById("f1").value ... } ... <form name="testform" action=??? onsubmit="testf()" ????NOT TO BE SUBMITTED????> F1: <input type="text" id="f1" /> ???? </form> Thanks for any help read more about "Internal" use only form?
Message from hotani Most recent post: 6/7/2007 2 authors and 2 replies. I'm building an auto-suggest drop-down for text fields. It is coming along, but there is one major problem: the history dropdown which firefox insists on displaying, is blocking the menu I am building! This only happens on fields that have a history of items. I cannot find a way to disable this "feature". Does anyone know? I'm guessing IE does the same thing. I tried turning off autocomplete, but apparently that is something different; it fills forms for you based on your user info. This is specific to certain fields. In case you are still not following me, if I typed "bob" and "joe" and "betty" in a form field in the past, firefox shows those to me in a drop-down when I start to type or hit the down-arrow. Actually, I'd love to find a way to tap into this and use it myself. If I could customize what is in the drop-down, that'd work great. If not, disabling it'll have to do. read more about firefox drop-down is blocking MY drop-down!
Message from gimme_this_gimme_that Most recent post: 6/7/2007 3 authors and 3 replies. While I have read a few messages and articles by M$ MVPs about how M$ is planning a transition away from VBA and towards Applescript, I have noted that nothing on Mac BU confirms that Applescript is even certain to be supported in Office 2008. Also, it'd be interesting to know whether: 1. Developers will be able to embed Applescript into their Workbooks and Word documents. 2. GUI Project for editing Applescript will be provided like what's currently provided for VBA. 3. WorkSheet controls such as dropdowns and buttons will be able to call AppleScript. 4. Whether there will be an AppleScript recorder 5. Whether one of the PowerShell languages will bundled with Office. As it is now the only way to build a complex Excel document from scratch with Applescript is to do it using MacPerl::Applescript. If any has details let us know. Mac BU does not support questions directed to its bloggers. Now that Apple computers can run Windows Office via Parallels the following? 1. What is the point of supporting Entourage? Outlook Express has a web front end and users generally are either using Web based mail or Apple Mail? 2. What is the point of providing an Applescript development environment when it appears that few Apple developers take advantage of it? (M$ only has itself to blame because all stories MVPs write about Applescript leave out details about how to communicate to other Mac languages such as Perl, Python, JAVA, or JPython.) Musings... read more about Future of Microsoft Office 2008 on Macintosh
Message from Fred Atkinson Most recent post: 6/1/2007 3 authors and 5 replies. I am trying to resolve a coding problem with a JAVAscript that I am trying to use. What I am trying to do is use a form, take a single value from that form, write it to a text file (by executing a .cgi script), and make a popup window (with a success (or failure) message and a button to close that popup window) with a defined height and width and no toolbar. Here is an example of the script and form that I am using: <SCRIPT> <!-- function definition(term,termname) { window.open(term,termname,"height=400,width=400,toolbar=no"); } // --> </SCRIPT> <form action="#" onSubmit="definition('http://www.mysite.com/cgi-bin/text.cgi','Text Entry'); return true;" METHOD="POST"> <big>Please enter your text: </big> <input type="text" name="textentry" size="6"><br><br> <center><input type=submit value="Submit to Text Log"></center> </form> When I put something in the text box and press the 'Submit to Site Visitor Log' button, I get the failure message every time and the text value isn't written into the text file. I suspect the problem is the way I'm coding the 'form action' statement. But I can not figure out just what is wrong. I know that the .cgi script is working just fine because I use it from another form that does not use the JAVAscript. With this read more about Form Problem
Message from Bam Most recent post: 5/24/2007 2 authors and 4 replies. Hey gang. THis may be asked somewhere before, but I could not find it. I am trying to pass a variable that is defined in a sql statement, to a window.open page. I am not having any luck in being able to do this. Here is what I have. Oh, using asp, not php. varida is the variable I am trying to pass. Normally, with a regular querystring, it passes as ?id=<%=varida%> but that does not give me the results. so I have tried function newwindow() { window.open('http://mysite/edit_email.asp?id=" + varida + "','jav','width=300,height=300,resizable=yes,titlebar=no,toolbar=no'); } and function newwindow() { window.open('http://mysite/edit_email.asp?id=" + <%=varida%> + "','jav','width=300,height=300,resizable=yes,titlebar=no,toolbar=no'); } and function newwindow() { window.open('http://mysite/edit_email.asp?id="<%=varida%>"','jav','width=300,height=300,resizable=yes,titlebar=no,toolbar=no'); } none of the above will pass the variable. can someone help me out here please??much thanks read more about Pass a variable
Message from tochiro Most recent post: 5/24/2007 2 authors and 2 replies. Hello, I am trying to teach myslef DOM scripting but I'm having a hard time :-) I'd like to show/hide a ul list by clicking on the heading of the list. What is the correct way please? Thank you for your help read more about Showing/Hiding Chunks of XHTML code
Message from H Most recent post: 5/24/2007 2 authors and 2 replies. Hi, Is it possible to use JAVAscript to detect the current page and disable the link? Does anybody know a method to disable the link to the current loaded page or a website with an example? Regards, Hans read more about How to disable link to current page?
Message from Cessna Most recent post: 5/24/2007 2 authors and 2 replies. In my form validation, I'm testing a form input field to see if it contains the same number as a variable contains. if the variable is called "match1", and my user text field is named "guess1" I'm trying to create a statement in my form validation function something like this: if (document.form1.guess1.value) != (match1) { alert("Please guess again ..."); form1.guess1.focus(); return false; } I think i'm not doing the != statement properly, any hints appreciated ... thanks! CN read more about forms: test variable against user input
Message from Smiles Most recent post: 5/23/2007 4 authors and 4 replies. good day I have never used JAVAscript head office has ask I add this line of code to a html page local( $remoteHostIP ) = $ENV{"REMOTE_ADDR"}; and display IP can any one tell me how to display also what book'd you recommend to learn JAVAscript thanks read more about how do I dispay output
Message from Mike Scirocco Most recent post: 5/22/2007 3 authors and 7 replies. I have an iframe that includes a button: <input type="button" value="close" onclick="window.close();" /> I'd like to detect the iframe close from the parent window, I was using this but every time the page loads the close event fires! function temp(){ alert('the iframe was closed'); } function setup(){ var myIFrame = document.getElementById("iframe1"); if (myIFrame.addEventListener) { myIFrame.addEventListener('onclose', temp(), false); }else if (myIFrame.attachEvent) { myIFrame.attachEvent ('onclose',temp); }else{ myIFrame.onclose=temp(); } } window.onload=setup; Any suggestions'd be appreciated. TIA, Mike read more about having trouble w/event listener to detect iframe close
Message from Woody W Most recent post: 5/21/2007 2 authors and 2 replies. populating a drop down menu using JAVAscript - how is it done?Thanks, read more about populating a drop down menu using JAVAscript
Message from Derk Most recent post: 5/3/2007 2 authors and 2 replies. I need to add up and check the invoice line values that have been input against a Total Invoice Amount I list out the categories with input boxes called 'category1', 'category2', etc - These catagories are variable and there could by up to 50 I want to add all the values entered and then cross check the total agains a total value entered by the user and error it if there is a mismatch I nned to loop all the input boxes and add the values up, but I cant seem to figure out how to reference these fields in a loop Thanks Derrick read more about Adding up Invoice Lines
Message from Roger Most recent post: 4/27/2007 2 authors and 3 replies. Bonjour, Je suis entrain de faire un site que j'essaie de tester avec différentes versions de Netscape et de Internet Explorer. J'ai réalisé une animation que je n'arrive pas à faire fonctionner avec la version en objet de Netscape. Voici un exemple qui fonctionne sous toutes les versions de Internet Explorer: <div id='animation' style='position:absolute;left:50;top:30;z-index:2'><img src=....></div> 1) Récup sous IE: monobjet=document.all.animation.style; Je peux ensuite faire varier monobjet.left et monobjet.top à volonté ! 2) Sous les versions récentes de Netscape je récupère monobjet de la façon suivante: monobjet=document.getElementById('animation').style; et ensuite je fais encore varier monobjet.left et monobjet.top à volonté 3) la récupération de type 2) sous Netscape 4.7 n'étant pas encore implémentée la doc dit d'utiliser: monobjet=document.layers['animation']; et ensuite comme précédemment: monobjet.left et monobjet.top c'est ce que je fais, malheureusement ça ne marche pas ! Quelqu'un a-t-il déjà été confronté à ce problème et y a-t-il une solution? Avec mes remerciements. Roger Girardon read more about Probl?me avec Netscape 4.7
Message from Mike Green Most recent post: 4/26/2007 4 authors and 4 replies. Hi All Please can someone help me? I am looking for a very simple image changer. I need to fade between four small pictures on a web site, 200px wide x 150px tall, I just need image one to be visible when the page loads and then, after a few seconds fade out and be replaced by image two and so on. I do not want anything fancy, no frames, no layers just a simple script that fades through a few pictures. I used to have a small JAVA script that you could place anywhere on the page and could be formatted using css, but alas two hours of searching my old backups have revealed nothing. Can someone point me in the right direction to where I can find the script/applet that will fill my needs, or even post the script to the forum? Freeware'd be nice too, if possible. I have tried Dynamic Drive and co and all the image scripts etc now seem to provide too many bells and whistles for my requirements. Thanks in advance Mike read more about Simple image fader
Message from zoropoteame Most recent post: 4/26/2007 2 authors and 3 replies. In one function I create a DIV element: var card = document.createElement("div"); card.setAttribute("onmouseover", "myOtherFunction()"); document.getElementById(p_destination).appendChild(card); This is a dynamic load element, this isn't constructed on the server, but rather through JAVAscript. When viewed in Firefox this works and the "myOtherFunction()" gets executed. When viewed in IE it doesn't work. Anybody got any idea why? read more about Dynamically created Elements... not working on IE, yes on Firefox
Message from Marcel Molenaar Most recent post: 4/24/2007 2 authors and 3 replies. What does this mean: element.multi_selector = this; I is used in this JAVAscript class: http://the-stickman.com/web-development/JAVAscript/upload-multiple-files-with-a-single-file-element/ I understand that this line is adding a reference to the object but can someone explain me why this is important and what is it used for? Marcel read more about Question this
Message from mouton Most recent post: 4/11/2007 2 authors and 4 replies. Hello, I am a beginner and I am trying this short script in an external js file: function print() { alert("just a test"); } windows.onload = print; But popup box appears in the browser when I call my html page. What am I doing wrong? Thank you for your help. read more about Problem with window.onload
Message from idoxlr8 Most recent post: 4/9/2007 2 authors and 2 replies. I have searched for hours now and have yet to find what I need. I have a column included on all of my pages with the include tag. I'd like to find JAVAscript to randomly change this include. In other words everytime the page is reloaded the column changes content... Any help'd be appreciated Thanks Remove the _NO_SPAM to reply by email -- read more about Randomly Include Page
Message from Severus Snape Most recent post: 4/3/2007 2 authors and 6 replies. If someone could tell me where I'm going wrong with the code below, I'd greatly appreciate it. (Sorry for the cross-post on comp.lang.JAVAscript, but nobody responded there). I can toggle the visibility of 1 object at a time in IE and Firefox, but can not do it on multiple objects simultaneously. The page loads with four or more tables that are hidden (using style="visibility:none") and above each table is an image that's an On/Off button. See page snippet at bottom. For example, if I click button #1, table #1 should toggle visibility and all other tables should remain hidden. If table #1 is visible and I click button #3, table #1 becomes hidden and table #3 becomes visible. My code loops through an array, but for some reason, the loop only runs twice. I have resisted using cookies because too many people block them.function toggleText(toggleObj) { var myObj = document.getElementById(toggleObj); // what we click var currObj; // this gets used in the loop var i; // create an array item for each table we want to toggle var textStuff = new Array(); textStuff[0] = 'itemOne'; textStuff[1] = 'itemTwo'; textStuff[2] = 'itemThree'; textStuff[3] = 'itemFour'; // loop through the array to look at each object on the page // I do not know wny the loop only runs twice -- I have tested // it with Alerts for(i = 0; i<textStuff.length; i++) { // the array item we're currently looping on will get some tests read more about Need help displaying & hiding multiple objects simultaneously
Message from you.zed2001 Most recent post: 3/26/2007 2 authors and 2 replies. salut je suis une debutante avec le JAVAscript et j'ai un tou petit truc ki bloque je veux ecrir une fonction qui affiche un tableau JAVAscript sous forme de liste a puces pour afficher une liste de nom ou de couleurs j'ai reussi a ecrir un petit programme: <html> <body> <script language='JAVAscript'> var t=Array(); t[0]="bleu";t[1]="blanc"; t[2]="rouge";t[3]="vert"; //ou: var t= Array ("bleu","blanc","rouge","vert"); for (var i=0; i<t.length; i++){ document.writeln("<ul>","<li>",t[i],"</li>","</ul>","<br>"); } </script> </body> </html> mais j'arrive pas a le transformer en fonction vu que pour une fonction elle retourne une valeur merci d'avance !! read more about fonction JAVAscript
Message from Simon Most recent post: 3/1/2007 2 authors and 2 replies. Hi there, How can I activate, for example, the insertkey, without pressing the key itself? Something like: "window.event.keyCode = 45" won't work. Any ideas? It should happen onfocus, and "unhappen" "onunfocus" (I've an inputfield, value is today's date, but when onfocus it should type over the first characters so that the year wont have to by retyped. (After adjusting day and month people can leave the field and go to the next field.) Thanks, Simon read more about activate key through JAVAscript
Message from Nico Most recent post: 2/27/2007 2 authors and 2 replies. Oh dear, oh dear! I am a secondary school teacher. I run a website as a hobby. I also use this site to cummunicate information to my students (schedules, keys, results, etc.). In order to protect my students'privacy I've used a password procedure. However, today one of my brighter students drew my attention to the fact that this JAVAscriptprocedure is incompatible with the new IE-7. Sad times. Is there anyone who knows of an IE-7 compatible password script I could use instead of the old one? I'll greatly appreciate your suggestions! Nico read more about ie7 compatible password procedure
Message from Erica Most recent post: 2/14/2007 2 authors and 2 replies. wrote in message myself html page that is for use only by me. I the html page has a link to a webpage that can only be ran from "Internet Explorer". How do I use JAVAscript to launch this link inside of "Internet Explorer" ? Thanks, read more about how to start Internet Explorer from JAVAscript
Message from Bob Fry Most recent post: 2/13/2007 4 authors and 4 replies. Just kinda thinking out loud. I am thinking of switching from my current static IP number to dynamic, because I can get more download bandwidth for less money (ADSL). However, to connect to work from my home PC I need to send an email with my current IP number. With static IP that's trivial, with dynamic I would've to login to my router, see what the IP number is, type it into the email, then send. And being physically lazy that sux. So I'm thinking a script could do this, write? Hmmm, should be in VBA to do everything...which I do not know. Or can JAVAscript access Microsoft Outlook 2003 which I use for email? Well, maybe this email does not have to use Outlook....so many options, so little knowledge. -- "If brute force does not solve your problems, then you are not using enough." read more about extract dynamic IP number from router
Message from Leon Most recent post: 2/13/2007 3 authors and 8 replies. Hi Chaps, I've been looking around the internet and I really can not see what I'm doing wrong here ! This code works in firefox, but not internet explorer. Any suggestions please? Internet Explorer just doesnt update the action of the form so when you hit the button - it seemingly just refrehes the page! <form name="actions" action="" method="post"> <select name="action" class="formBox"> <option value="null" onclick="this.form.action.value='';">Select Action From List <option value="resendActEmail" onclick="this.form.action.value='./admin_process.php?a=resend';">Re-Send Activation Email <option value="deletaccount" onclick="this.form.action.value='./admin_process.php?a=delete';">Delete This Account </select> <input class="formBox" type="submit" name="submit" value="Go"> </form> Thanks, Leon read more about Form Woes !
Message from Panther Most recent post: 1/30/2007 3 authors and 3 replies. I am trying to load one page inside of another without using frames. For example: page1.html(main page) in the html code is a table, in this table I want to load/show page2.php or the "output" of it. read more about Page inside of another
Message from Snoopie Most recent post: 1/20/2007 2 authors and 3 replies. i've 2 .js files, mpi.js and functions.js the functions.js file contains common functions that I reference from my web pages. I have a function in mpi.js that needs to call one of the functions from functions.js but I dont know how to do this. if memory serves me in JAVA you had to use the import statement, but that doesn't appear to work in this case. Snoopie read more about How do I call a function from another .js file?
Message from realtime Most recent post: 1/19/2007 2 authors and 2 replies. go to this site http://www.australianpokerleague.com/ForumPost.asp?cid=44&navid=44&ForumTopicID=2118 now scroll the webpage in the browser how do they make it so that backgroud doesnt move with the page Thanks... read more about was wondering how do they do this
Message from Jonas Smith Most recent post: 1/17/2007 3 authors and 5 replies. I need to set up a way to download multiple files with JAVAscript. I've an Array with the individual file URLs. I can download the files with the 'open' call. However, that opens as many windows as there are files to download. I tried the location.href property, but only the last file in the Array would download. Is there a way to do this? -- Jonas read more about Downloading multiple files with one click?
Message from Jonas Smith Most recent post: 1/5/2007 2 authors and 2 replies. What is the best way to pass a value between pages accessed from the harddrive? (The user downloads the whole manual and reads it locally from his harddrive.) I'm trying to create a script that enables the user to set the page's font size from a drop down menu. It's fairly easy to do, however, the manual being read is comprised of multiple files, so it is very desirable that the font size can be set only once per session and the font size is available to the script when accessing different pages. I tried saving the value that the user selects through the menu in a cookie, and the scripts starts by checking for that cookie. It works in Firefox and other Gecko based browsers (the cookie has no domain), but it does not work in Safari. Safari won't save a cookie that did not come from a server. I do not have IE handy to check if it works with it. So, is there a better way to pick up the font size value set in one page from another page? -- Jonas read more about Persistent Variable across pages
Message from Fred Most recent post: 1/4/2007 2 authors and 4 replies. I'm using a script that uses the computers clock and prints the date on a html document. I've been asked to place a phone number below the printed date. This may sound like a simple request for most you guys but for newbies like me its a nightmare. Can you show me how to have the script place a phon number beneath the printed date? Below is the script.var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December") function getthedate(){ var mydate=new Date() var year=mydate.getYear() if (year < 1000) year+=1900 var day=mydate.getDay() var month=mydate.getMonth() var daym=mydate.getDate() if (daym<10) daym="0"+daym var hours=mydate.getHours() var minutes=mydate.getMinutes() var seconds=mydate.getSeconds() var dn="AM" if (hours>=12) dn="PM" if (hours>12){ hours=hours-12 } if (hours==0) hours=12 if (minutes<=9) minutes="0"+minutes if (seconds<=9) seconds="0"+seconds //This is where the date/time gets printed. I have tried inserting the phone number here but I'm not using the correct syntax and the script crashes. Can you help by showing me how print a phone number below the time? var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+mi read more about Placing Static Text (Phone Number) Below Printed Time
Message from -Lost Most recent post: 12/28/2006 2 authors and 2 replies. Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOM3Document.domConfig]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL> :: line 15" data: no] Line 15 being: s += j + ". " + I + ": " + document[i] + "<br />\n"; All the code: s = ''; j = 1; for (i in document) { s += j + ". " + I + ": " + document[i] + "<br />\n"; j++; } In Mozilla Firefox it prints a nice 136 item long list, but also throws that error up. Can anyone explain to me what it means and why it popped up? Many thanks in advance. -Lost read more about Uncaught Exception... I've no clue about.
Message from Magician Most recent post: 12/26/2006 2 authors and 2 replies. Hello. I am trying to set the onclick event for images through a function, but the event is triggered as soon the page loads, then won't work when the image is clicked. Can anyone suggest what is wrong? I am using IE6 for testing. --------------------------------------------------------------------------- window.onload = fnNewWindowLinks; function fnNewWindowLinks() { for (var intLinks=0; intLinks<document.links.length; intLinks++) { if (document.links[intLinks].className == "picture") { document.links[intLinks].onClick = alert("Clicked"); } } } --------------------------------------------------------------------------- Regards read more about onClick event problem
Message from Fabio Most recent post: 12/19/2006 4 authors and 7 replies. I know the syntax for variable "variabletopass" in ASP: www.destinationpage.asp?variable=<%=variabletopass%> What's the syntax for JAVAscript? Thks Fabio read more about JAVAscript and QString
Message from Suzanne Most recent post: 12/1/2006 4 authors and 4 replies. Hey! I'm brand new to JAVAscript. I am writing some functions for a class I've, and I came up with this function that works perfectly on Safari, but doesn'thing in IE or Firefox. I've checked time and time again and find nothing wrong that could be causing this. Any help'd be appreciated! function calculateTotal(){ //This conditional statement throws an alert on submit, that none of the fileds //have been filled out if((""==document.forms.buy.singleclass.value) && (""==document.forms.buy.sixweeks.value) && (""==document.forms.buy.group.value)){ alert("Please select one of the class packages below"); //stop the function at this point break; } //declare 3 variable an give them the value of the objects * the cost var x = document.forms.buy.singleclass.value * 45; var y = document.forms.buy.sixweeks.value * 250; var z = document.forms.buy.group.value * 110; var result = x + y + z; alert("The total cost for your classes is $" +result+ ".00"); } read more about Function works in Safari, not in IE or Firefox.
Message from bodorange Most recent post: 11/26/2006 2 authors and 3 replies. I'm not sure if this is a JAVAscript question or more google maps API (application programming interface)specific. I'm new to both JAVAscript and Google maps and find the code less readable if I use inline functions. How do I use GEvent.addListener() with say a reference to a function (or similar) as an argument rather than an inline function as the argument? How can I call something like GEvent.addListener(map, 'click', map_click(point)); function map_click(aPoint){ . . } Thanks for any help. read more about Non-inline function as argument
Message from Guenther Sohler Most recent post: 11/26/2006 2 authors and 2 replies. Hallo, Are there any functions in JAVAscript, which tell you, which hierarchy exist in an HTNL Site - which forms exist and whats their name, which pictures exist and whats their name etc. read more about Finding out structure
Message from Chris Most recent post: 11/26/2006 2 authors and 2 replies. Does anyone know of any tools and resources for converting and analysing pages to find out why they do not work in IE 7, this applies mainly to JAVAscript but also to CSS. The place I work at has a load of web applications, which were designed in the Dark Ages and the management are scratching their heads wondering why things designed for IE 4 do not work in IE 7. Regards, Chris. read more about IE 7
Message from John Obrien Most recent post: 11/26/2006 2 authors and 2 replies. I am getting this error Line 179 column 17: document type doesn't allow element "script" here. "text/JAVAscript">I tried every doc type listed and still get the error. The program is long. Any suggestions before I give up? Thanks read more about Error message