JavaScript - Need A Code To Disallow Changing Values
HI every one
i want to disallow users to change a text input values . I don't want to use disabled tag of text input because of some problem . I just want to disallow users to enter or change a text input value . How can I do so ? thanks Similar TutorialsI am having an issue reading from a div that is being changed. The div in question was initially empty. A function that was called upon the selection of something in the drop down list creates another drop down list within that div (sets the inner html). Now, I have another function that needs to read from this new drop down list. However, when I use alert(document.getelementbyid('divid').innerhtml) in the function it returns undefined. The drop down list is created successfully and populated by the relevant data. The method of creation was calling another php file that created the list after querying a database. Any ideas? I can post the code if it will help.
i have a html/php form which let users upload pictures onto my server. the problem with it is, it says the picture has been uploaded but if the file name contains any of character apart from text (A-z) and numbers, the picture never shows up in the admin panel. is there a way using ajax or jquery to disallow certain file names in the upload field of the html which uses these characters !@#$%^'&*()"? how do i go on about this? Hey guys, I have been trying to get better at my javascript as of late and there is this one particular color fading technique I have found that I am having trouble dissecting. The following code appears to be how they are making a rollover go from a dark gray to a subtle light gray with a nice fade but I can't exactly tell whats going on from the code. Is it just telling it to add a rgb point in so many seconds? Any professional help would be greatly appreciated. Code: colorInit= true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],0),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],0),255),0)+")"}}); I work at a college radio station and our brand new website just went live, but we're having one particular issue... We have a set list of shows that air each day, and on the site we have a marquee tag on the homepage that scrolls through showing each show and its broadcast time. Right now we're stuck changing this schedule each day by hand, but it's tough considering we're all college students ourselves and sometimes our own schedules simply don't allow the time. Is there a code that would allow this kind of a daily update to happen automatically? The format for the schedule is such: 4 - 5 pm // "Show 01" 5 - 6 pm // "Show 02" 6 - 8 pm // "Show 03" 8 - 10 pm // "Show 04" 10 - 12 am // "Show 05" Any help would be very much appreciated! Code: <script type='text/javascript' src='http://www.feedzilla.com/tools/swfobject.js'></script> <script type='text/javascript'> var flashvars = {id:'5018093150881',code:'flash',c:'',scroll:'v',prov:'news',cat:'Sports',cat2:'Basketball - NBA',width:'728',height:'90',num_articles:'10',show_summaries:'Yes',show_sources:'Yes',show_dates:'Yes',related_show:'No',vid:'',title:'',title_size:'12pt',title_bold:'Yes',keywords:'',url:'',headers_size:'14pt',font_size:'10pt',font_family:'Arial',text_alignment:'Left',space:'Yes',titlecolor:'#e53211',fcolor:'#000000',desccolor:'#ffffff',sourcecolor:'#e53211',datecolor:'#888888',bgcolor:'#000000',ref:document.location.href}; var params = {scale:'noscale',salign:'lt',bgcolor:'#000000'}; var attributes = {}; swfobject.embedSWF('http://www.feedzilla.com/widgets/news-widget.swf', 'Feedzilla_news_widget_501809963', '728', '90', '9.0.0','',flashvars, params, attributes); </script> <div id='Feedzilla_news_widget_501809963'></div> That produces this: I want to get rid of that strip on the bottom that says "Get This" which stretches all the way across. Is there anything I can change in that code to make this happen? I am very new to coding, trying to teach myself some javascript. I know this is a very simple code, I just can't seem to nail down what is going wrong. Feeling really stupid right now. Heres the code: Code: <html> <head> <script language="JavaScript"> var choice=confirm("Press ok for black. Press cancel for red."); if (choice==true){ document.bgColor="yellow"; document.fgColor="black"; } else { document.bgColor="red"; document.fgColor="white"; } </script> <body> <p>words</p> </body> </html> If someone could take a second to set me straight, I would really appreciate it. btw: hope I posted all this according to the "rules". I tried EDIT: goto post #7 here goes JS code: (keep an eye on codes of type: document.getElementById('footerX').innerHTML=X Code: function details() { var choo = document.getElementById("choo"); aa = choo.chooserver.value; bb = choo.chooversion.value; if(aa==1) {k=0} else if(aa==2) {k=1} else {k=false} pa= domain[k].getElementsByTagName("server") ; pb=""; pc = domain[k].getElementsByTagName("version"); pd= domain[k].getElementsByTagName("date"); pe= domain[k].getElementsByTagName("month"); pf= domain[k].getElementsByTagName("year"); ta = (bb==1)? " T4 ":(bb==2)? " T3.6 " :(bb==3)? " T2.5 " : 100 ; versions(ta); document.getElementById('footer1').innerHTML='one'; } function versions() { for (i=0;i<=pc.length;i++) { a = pc[i].childNodes[0].nodeValue; b = pa[i].childNodes[0].nodeValue; comparedate(d,g,f); dates(i, a); document.getElementById('footer2').innerHTML='two'; if (a==ta) { addto() document.getElementById("mc"+i).innerHTML= txt ; document.getElementById("md"+i).innerHTML= txt2 ; } document.getElementById('footer3').innerHTML='tee'; } document.getElementById('footer4').innerHTML='fou'; } HTML: Code: <div id = "conten2"> <table id="tb1" border="1px"> </table> </div> <div id = "footer"> feet </div> <div id = "footer1"> feet1 </div> <div id = "footer2"> feet2 </div> <div id = "footer3"> feet3 </div> <div id = "footer4"> feet4 </div> <div id = "footer5"> feet5 </div> Desired Output: feet one two tee fou feet5 Output: feet feet1 two tee feet4 feet5 Area of error predicted: inside the for loop, the statement immediately after loop is not executed once loop ends, nor does it return to original function for execution of other statements which were written after the function containing the loop was called.... Hi , I made a table that retrieves some Data from the Database also I did some calculations for this data using Javascript and It works fine , but I can't see the calculated values in the source code . That's the Problem , cause I can't print it or export it without these values. and the source code doesnt show it... so , what can I do , to view the generated values from JS in the source code ?? Thanks , I'm afraid this is a task related to my job and I need ur Help Urgently I'm using IE 6 only as a web browser and the Javascript Calculations are functions and Classes in a seperated file and I linked it to the Report page ... How come the below code is not woring for me? when someone comments on my facebook comments plugin I want to get an email. This is what i have Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '220041184732123', // App ID channelUrl : '//http://www.corkdiscos.com/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); FB.subscribe('comment.create', function(response){ // Here you need to do a call to some service/script/application // to notify your administrator about new comment. // I'll use jQuery ajax to call server-side script to illustrate the flow $.post('mail.php', { "action": "comment created", "url_of_page_comment_leaved_on": response.href, "id_of_comment_object": response.commentID }); }); }; // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; d.getElementsByTagName('head')[0].appendChild(js); }(document)); </script> <div class="fb-comments" notify="true" data-href="http://www.corkdiscos.com/testimonials.html" data-num-posts="30" data-width="544"></div> </body> </html> I then have this php code to send me a mail in a mail.php file PHP Code: <?php $admin_email = 'corkdjs@gmail.com'; $commentID = $_REQUEST['id_of_comment_object']; $page_href = $_REQUEST['url_of_page_comment_leaved_on']; $message = "hello"; mail($admin_email, You have a new comment", $message); ?> what could be wrong and is there anyone that knows how to fix this to make it work? So I have a little calendar widget on my site, for people to choose their dates for a reservation system. They then click a 'Book Now' button which creates a dynamic url (using their start date and the number of dates) to the booking engine. The problem is, the way it accomplishes this (window.location.href=), breaks cross-domain tracking on Google Analytics. And I'm not smart enough to figure out how to do it any other way. What I'd like to do is have clicking the Book Now button change the URL in the form action within the form with ID resForm, and then submit the form. I'm hoping someone can help me edit the form so that it accomplishes this. I'd be incredibly thankful. This is what I currently have: Code: <script> jQuery(document).ready(function($) { $(".book-now").click(function() { if($('#check-in').length > 0 && $('#DepartureDate').val() != '') { var data = $('#check-in').val(); var arr = data.split('/'); var datac = $('#DepartureDate').val(); var arr2 = datac.split('/'); var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var firstDate = new Date(arr[2],arr[0] -1,arr[1]); var secondDate = new Date(arr2[2],arr2[0] -1,arr2[1]); var diffDays = Math.round((firstDate.getTime() - secondDate.getTime())/(oneDay)); if ((diffDays) < 0) { diffDays = Math.abs(diffDays); var link = "https://res.windsurfercrs.com/bbe/page1.aspx?propertyID=13841&checkin=" + arr[0] + "/" + arr[1] + "/" + arr[2] + "&nights=" + diffDays; console.log(link); window.location.href= link; } else { alert ('Please fill in correct Check-In and Check-Out dates. The Check-In date must be before the Check-Out date.'); } } else { alert ('Please fill in a Check-In and Check-Out date, thanks!'); } }); }); </script> The form looks like this: Code: <form action="#" onSubmit="_gaq.push(['_linkByPost',this]);" method="post" id="resForm"> <input type='text' name="checkin" id="check-in" readonly="readonly" style="cursor: text" data-default="MM/DD/YYYY" class='arrivaldate'/> <input name="checkout" id="DepartureDate" readonly="readonly" style="cursor: text" data-default="MM/DD/YYYY" class='departuredate'/> <input type="button" value="BOOK NOW" class='book-now' /> </form> Reply With Quote 01-25-2015, 12:46 AM #2 Old Pedant View Profile View Forum Posts Supreme Master coder! Join Date Feb 2009 Posts 28,310 Thanks 82 Thanked 4,754 Times in 4,716 Posts Just call the _gaq() function manually. Code: _gaq.push(['_linkByPost',document.getElementBy("resForm")]) window.location.href= link; Hi gud mng, I have one problem... How to process textbox values/ call textbox values in JS through a Java program. My text box values are dates. I have to process these dates. Like in online banking we select day to know our transactions. After submitting we get results. remember my files are in my directory only. No need of database. My files are look like 20100929, 20100930, 20101001 For epoch_classes.js, epoch_styles.css u can download coding from this link : http://www.javascriptkit.com/script/...ch/index.shtml Code: Code: <html> <table width="900" border="0" cellpadding="10" cellspacing="10" style="padding:0"> <tr><td id="leftcolumn" width="170" align="left" valign="top"> <div style="margin-left:0px;margin-top:0px"><h3 class="left"><span class="left_h2">Select Option</span></h3> <a rel="nofollow" target="_top" href="day_wise.htm" >Day-wise</a><br /> <br /> <a rel="nofollow" target="_top" href="between.htm" >Between Days</a> <link rel="stylesheet" type="text/css" href="epoch_styles.css" /> <script type="text/javascript" src="epoch_classes.js"></script> <script type="text/javascript"> var cal1, cal2; window.onload = function () { cal1= new Epoch('epoch_popup','popup',document.getElementById('popup_container1')); cal2= new Epoch('epoch_popup','popup',document.getElementById('popup_container2')); }; /*............*/ function confirmation(f) { var startdate = f.fromdate.value var enddate = f.todate.value var myday=new Date() var yr=myday.getFullYear() var mn=myday.getMonth()+1 var dt=myday.getDate() var today="" var present, ys, ms, ds, ye,me,de, start, end if(mn < 10) { mn = "0" + mn } if(dt <10) { dt = "0" + dt } today= yr + "/" + mn + "/" + dt present=yr + "/" + mn + "/" +dt if (today < startdate ) { alert (" Start date should not be exceed to-day's date " + present ) startdate.focus() return false } if (today < enddate ) { alert (" End date should not be exceed to-day's date " + present ) enddate.focus() return false } if (today == startdate ) { alert(" You are selected to-days date as Starting day" ); } var answer = confirm("Do you want to continue ?") if (answer) { if( startdate < enddate) alert("Dates between " + startdate + " to " + enddate + " are confirmed" ) else alert("Dates between " + enddate + " to " + startdate + " are confirmed" ) } else { alert("Date not confirmed") window.location="to_date.htm"; } ys= startdate.substring(0,4); ms= startdate.substring(5,7); ds= startdate.substring(8,10); start=ys + "" + ms + "" +ds ye= enddate.substring(0,4); me= enddate.substring(5,7); de= enddate.substring(8,10); end=ye + "" + me + "" +de } /*.......................................................*/ </script> <div style="margin-left:100px;"> <body> <style type="text/css"> #conf { margin-left:115px; } </style> <td align="left" valign="top"> <table width="100" border="0" cellpadding="0" cellspacing="0"> <td style="padding-top:0px"> </table> <h4>From Date</h4> <form name= "formbet" id="placeholder" method="post" action="#" > <input id="popup_container1" type="text" name= "fromdate" maxlength="10" size="20"/> <td align="left" valign="top"> <table width="300" border="0" cellpadding="0" cellspacing="0"> <td style="padding-top:20px"> <h4>To Date</h4> <input id="popup_container2" type="text" name= "todate" maxlength="10" size="20"/> <br /> <br /> <input id="conf" type="button" onclick="confirmation(this.form)" value="Submit"> </form> </body> </html> In my coding, ys, ms, ds represents year starting, month starting, starting day... ye, me, de represents end... start,end gives file names in the format of yyyymmdd now i want to process files from 20100101 to 20100930 means from date is 2010/01/01 and to date is 2010/09/30 if i press submit button the files from 20100101 to 20100930 are processes here ys=2010 ms=01 ds =01 and ye=2010 me=09 de= 30 For this how do i call these textbox values (from date text box and todate) to another program (java) Thanks in advance. I have a bunch of checkboxes like below that the user can check some or all and click the button and see the values of all the selected checkboxes. How can I do that? Code: <script> function alertValues(){ } </script> <input type="checkbox" class ="normal2" value="131971" name="list[]" > <input type="checkbox" class ="normal2" value="131973" name="list[]" > <input type="checkbox" class ="normal2" value="131975" name="list[]" > <input type="checkbox" class ="normal2" value="131977" name="list[]" > <input type="button" onClick="alertValues()" Hi, What's a good way/ideal data structure to achieve this? The objective of the code/function is to map user-inputted strings into a pair of specific, hard-coded strings. For example, say the user types "firefox" or "ff", or "fx". The output would be the pair ["browser", "mozilla"], for example. I'm currently using a multidimensional array, but it feels inefficient and I'm having trouble mapping an arbitrary number of inputs into 2 outputs. Code: var strings = [ ["input1", "output1a"], ["input2", "output1a"], ["input3", "output1a"], ["input1", "output1b"], ["input2", "output1b"], ["input3", "output1b"] ]; How should I map the elements ["input1", "input2", "input3"] => ["output1a", "output1b"] ? Another method I used previously was a massive switch statement. This fulfills my needs, but I'm not sure about the efficiency (though if I remember correctly, switch statements become more efficient as size grows, since it uses a hash table?). Code: switch (input) { case "ff": case "firefox": case "fx" : case "ffox": return ["browser", "mozilla"]; case "ie": case "internet explorer": return ["browser", "microsoft"]; ... } This post will contain a few guidelines for what you can do to get better help from us. Let's start with the obvious ones: - Use regular language. A spelling mistake or two isn't anything I'd complain about, but 1337-speak, all-lower-case-with-no-punctuation or huge amounts of run-in text in a single paragraph doesn't make it easier for us to help you. - Be verbose. We can't look in our crystal bowl and see the problem you have, so describe it in as much detail as possible. - Cut-and-paste the problem code. Don't retype it into the post, do a cut-and-paste of the actual production code. It's hard to debug code if we can't see it, and this way you make sure any spelling errors or such are caught and no new ones are introduced. - Post code within code tags, like this [code]your code here[/code]. This will display like so: Code: alert("This is some JavaScript code!") - Please, post the relevant code. If the code is large and complex, give us a link so we can see it in action, and just post snippets of it on the boards. - If the code is on an intranet or otherwise is not openly accessible, put it somewhere where we can access it. - Tell us any error messages from the JavaScript console in Firefox or Opera. (If you haven't tested it in those browsers, please do!) - If the code has both HTML/XML and JavaScript components, please show us both and not just part of it. - If the code has frames, iframes, objects, embeds, popups, XMLHttpRequest or similar components, tell us if you are trying it locally or from a server, and if the code is on the same or different servers. - We don't want to see the server side code in the form of PHP, PERL, ASP, JSP, ColdFusion or any other server side format. Show us the same code you send the browser. That is, show us the generated code, after the server has done it's thing. Generally, this is the code you see on a view-source in the browser, and specifically NOT the .php or .asp (or whatever) source code. Code: <img src = "/images/boats/large/my-red-pepper---8019812411a.jpg" width = "690" height = "350" id = "main_image" /> <div id = "gallery_thumbs"> <img src = "/images/nav_left.png" alt = "Back" id = "nav_back" /> <div id = "inner_thumbs"> <div style="width:10000px" id="sliding_thumbs"> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019812411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019712411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019412411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019312411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019212411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019512411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/my-red-pepper---8019612411a.jpg" /></a> <a href = "/images/boats/large/my-red-pepper---8019812411a.jpg" onclick = "document.getElementById('main_image').src=this.href;return false;" ><img src = "/images/boats/gallery_thumbs/big_my-red-pepper---12411-main.jpg" /></a> </div> </div> Why isn't this working? document.getElementById('main_image').src=this.href;return false; I originally had this: Code: $('#sliding_thumbs a').click(function() { $('#main_image').attr('src',this.href); return false; }) but that didn't work so I put the onclick inline and it still isn't working but I can't fathom why. I have confirmed that the #main_image is being detected correctly (by alerting the src) and that the this.href part contains the url of an image but nothing happens. There is no error and the large image doesn't load in the same window (so the return false part is working!) I have this script where people can pick a price and pick quataty. i want it to be only one price and let the person input quatity them selves, how can this be done? Thanks in advance Code: <script type="text/javascript"> function calculate_amount() { var subtotal = 0; var hamburger_subtotal = 0; var hamburger = document.myform.hamburger.value; var hamburger_qty = document.myform.hamburger_qty.value; var cheeseburger_subtotal = 0; var cheeseburger = document.myform.cheeseburger.value; var cheeseburger_qty = document.myform.cheeseburger_qty.value; var pst = 0; var gst = 0; var total = 0; //etc... //var chicken_burger; //var fries; //var gravy; //var chili; if (hamburger > 0) { hamburger_subtotal = hamburger * hamburger_qty; } subtotal = hamburger_subtotal; // myform -- depends on the name of your actual form, if it does not have one give it one. document.myform.display_hamburger_subtotal.value = hamburger_subtotal; if (cheeseburger > 0) { cheeseburger_subtotal = cheeseburger * cheeseburger_qty; } // myform -- depends on the name of your actual form, if it does not have one give it one. document.myform.display_cheeseburger_subtotal.value = cheeseburger_subtotal; subtotal = subtotal + cheeseburger_subtotal; pst = .07 * subtotal; gst = .05 * subtotal; // you cannot add the values after you call toFixed, so do the total now! total = subtotal + pst + gst; total = total.toFixed(2); subtotal = subtotal.toFixed(2); pst = pst.toFixed(2); gst = gst.toFixed(2); // this is wrong var tax = foo * 1.07; document.myform.display_subtotal.value = subtotal; document.myform.display_pst.value = pst; document.myform.display_gst.value = gst; //total = subtotal += pst += gst; document.myform.display_total.value = total; } </script> // first off this all needs to be wrapped in form tags if you are going to post the values to something. // you need to look up how to name your items, you should have an input type=x with name=y and id=y <form name="myform"> <table width="325"> <tbody> <tr> <th width="144">item</th> <th width="75">price</th> <th width="92">quantity</th> <th width="101">sub-total</th> </tr> <tr align="middle"> <td align="left">Hamberger</td> <td><select id="hamburger" name="hamburger" onchange="calculate_amount()"> <OPTION VALUE='2.99'>2.99</OPTION> <OPTION VALUE='3.99'>$.99</OPTION> <OPTION VALUE='4.99'>4.99</OPTION> </select> </td> <td><select id="hamburger_qty" name="hamburger_qty" onchange="calculate_amount()"> <OPTION VALUE='0'>0</OPTION> <OPTION VALUE='1'>1</OPTION> <OPTION VALUE='2'>2</OPTION> <OPTION VALUE='3'>3</OPTION> <OPTION VALUE='4'>4</OPTION> <OPTION VALUE='5'>5</OPTION> <OPTION VALUE='6'>6</OPTION> <OPTION VALUE='7'>7</OPTION> <OPTION VALUE='8'>8</OPTION> <OPTION VALUE='9'>9</OPTION> </select> </td> <td><input type="text" id="display_hamburger_subtotal" name="display_hamburger_subtotal" size="10" disabled="disabled" /></td> </tr> <td align="left">Cheeseberger</td> <td><select id="cheeseburger" name="cheeseburger" onchange="calculate_amount()"> <OPTION VALUE='3.99'>3.99</OPTION> <OPTION VALUE='4.99'>4.99</OPTION> <OPTION VALUE='5.99'>5.99</OPTION> </select> </td> <td><select id="cheeseburger_qty" name="cheeseburger_qty" onchange="calculate_amount()"> <OPTION VALUE='0'>0</OPTION> <OPTION VALUE='1'>1</OPTION> <OPTION VALUE='2'>2</OPTION> <OPTION VALUE='3'>3</OPTION> <OPTION VALUE='4'>4</OPTION> <OPTION VALUE='5'>5</OPTION> <OPTION VALUE='6'>6</OPTION> <OPTION VALUE='7'>7</OPTION> <OPTION VALUE='8'>8</OPTION> <OPTION VALUE='9'>9</OPTION> </select> </td> <td><input type="text" id="display_cheeseburger_subtotal" name="display_cheeseburger_subtotal" size="10" disabled="disabled" /></td> </tr> <tr align="middle"> <td align="left">Chicken Burger</td> <td><input size="7" value="$4.99" /></td> <td><input size="3" /></td> <td><input size="10" /></td> </tr> </tbody> </table> <table width="324"> <tbody> <tr> <th width="124">item</th> <th width="42">price</th> <th width="72">quantity</th> <th width="74">sub-total</th> </tr> <tr align="middle"> <td align="left">French Fries</td> <td><input size="7" value="$2.99" /></td> <td><input size="3" /></td> <td><input size="10" /></td> </tr> <tr align="middle"> <td align="left"><input type="checkbox" /> gravy</td> <td><input size="7" value="$0.50" /></td> <td><input size="3" /></td> <td><input size="10" /></td> </tr> <tr align="middle"> <td align="left"><input type="checkbox" /> chilli</td> <td><input size="7" value="$1.99" /></td> <td><input size="3" /></td> <td><input size="10" /></td> </tr> </tbody> </table> <table align="right"> <tbody> <tr> <td>subtotal</td> <td><input type="text" id="display_subtotal" name="display_subtotal" size="10" disabled="disabled" /></td> </tr> <tr> <td>pst 7%</td> <td><input type="text" id="display_pst" name="display_pst" size="10" disabled="disabled" /></td> </tr> <tr> <td>gst 5%</td> <td><input type="text" id="display_gst" name="display_gst" size="10" disabled="disabled" /></td> </tr> <tr> <td>total</td> <td><input type="text" id="display_total" name="display_total" size="10" disabled="disabled" /></td> </tr> <tr> <td colspan="2"><input type="button" value="total up order" /> </td> </tr> </tbody> </table> </form> I would like to have a code on my page that causes two or more photos to change between each other. For example, photo 1 is shown for a little while, then it switches to photo 2, etc. I would also like to switch text that goes along with the photos. I would like my layout to look like this: Photo / Text about Photo and have both switch after a little while, to the next photo and text. Hope this makes sense. Thanks in advance! I've got this script that spins an image for me but it dont stop spinning, in other words when i press startspinning with onclick it dont change it to stopspinning function it just keeps spinning, it works fine with href but not onclick. Code: function StartSpinning() { int = setInterval( 'SpinChange()', 100 ); $( 'SpinButton' ).innerHTML = "Spinning (Click to Stop)"; $( 'SpinButton' ).onclick = "StopSpinning();"; Effect.Fade( 'turns', {duration: 0.3} ); } function StopSpinning() { clearInterval( int ); $( 'SpinButton' ).innerHTML = "Spin it"; $( 'SpinButton' ).onclick = "StartSpinning();"; UpdateFigure(); Effect.Appear( 'turns', {duration: 0.3} ); } Can anyone help thanks. I'm working at masking my fantasy football site hosted by my provider onto my own subdomain, since they can't allow me point a dns at their servers. I did manage to mask the webaddress to my sub doman with a php script. But it also only masks the initial visit, and th link name. And now i'm trying to learn how mask the various url/links in the menus. As I little about javascript, can someone show me a way to mask the url address when a user mouses over them? The links themselves wont' change, I'm just trying to mask the link names on the mouseover to look like their on my own domain. Hope that all made some sense ok i have a script which will make a copy of the html in a div and place it into another div the problem with this it creates a duplicate element with the same id so what i want to know is can i create a new id based off old ids using a generic type script Code: function scope(e) { var popin = document.getElementById('popin'); popin.innerHTML = "<div class='container'>"+e.innerHTML+"</div>"; popin.style.display = "block"; } this code is designed for taking content in a small div and placing it into a larger div to increase the viewing area so what i would need is sumthing that can look for Code: id="sum text" and maybe amend it to Code: id="sum textP" or sumthing to that extent if sum1 could point me in the right direction that would be great if my post is not clear enough just ask me to be more specific or sumthing and i will see what i can do to try and make it more clear if needed |