JavaScript - Can I Submit Multiple Links At Once??
Is it possible to submit multiple links all at the same time using Javascript? I check all over the web and can't find any examples anywhere.
I would like to click on a button and submit to google, yahoo, msn, etc all at the same time. Like someone physically click on http://google.com, http://yahoo.com, http://msn.com, so on. Similar TutorialsHey everyone, I'm having a problem with a project i'm working on. We have a webpage setup to alpha page individual people with pagers at work. It is a simple form that submits to a php file on the pager server. I am working on creating a script that submits a alpha-page to everyone at once. There are about 120 different ppl in the company, I want the script to submit the form once for each persons pager. I'm new to javascript but have alittle programming understanding. This is what i have so far: Code: <html> <head> <title>Send a Page</title> </head> <body> <center> <form action="http://sendpage/pager/PageSend.php" method="POST"> <input type="hidden" name="ContactPagerNumberId[]" value="120"> <input type="hidden" name="PagemessageId" value="What are you doing?"> <input type="hidden" name="ScheduledDeliverydateId" value="2011-08-22"> <input type="hidden" name="ScheduledDeliveryTimeId" value="19:30:00"> <input type="hidden" name=ScheduledDeliveryAmPmId" value="selected"> <button style="width:140px; height:30px" type="submit" name="SEND">Submit</button> </form> </body> </html> The ContactPagerNumberId[] is the arbitrary value set to individual ppl's pagers. I'm not sure where to place the javascript code at. It doesn't seem as hard as I'm making it out to be. Any suggestions? For some reason for the life of me I can't figure this out and posting on the forms is my last results. I'm trying to create something like this http://powerpetsplus.site88.net/guides/clicker.php You will see on top I'm trying to get a next button that will go to a new page. The url is something like petid1 and clicking next will go to petid2 and so on. (it's the end URL) example http://www.petadoptworld.com/pages/petpage.asp?PETID1 and I need it to go to http://www.petadoptworld.com/pages/petpage.asp?PETID2 and so on. I was able to do this with a help of a friend: http://o.aolcdn.com/hss/storage/fss/...test_next.html but for it to work we have to click the button then the link on top. What are we doing wrong? This is the coding I'm using now. <div id="test"> <p> <input type="button" onclick="update();" value="Click me for the next pet"> - <a id="test_link" href="http://www.petadoptworld.com/pages/petpage.asp?petid=1"> Click Me <input id="previous" type="hidden" value="1"><br> </p> </div> <script type="text/javascript"> function update() { var t1 = document.getElementById('test_link'); var v1 = document.getElementById('previous'); t1.href= "http://www.petadoptworld.com/pages/petpage.asp?petid=" + (parseInt(v1.value) + 1); v1.value = (parseInt(v1.value) + 1); } </script> I'm also trying to figure it out since 8000 are needed if the page is refreshed it remembers what one they are on. hi, i am totally new to JS and was wondering if anyone could just suggest me a JS code, "THAT WOULD SELECT MULTIPLE LINKS ON MOUSE CLICK" <div id="container"> <ul id="seatplan"> <li class="seat_01 A"><a href="#row_01" title="01A">01A</a></li> <li class="seat_02 A"><a href="#row_02" title="02B">02A</a></li> <li class="seat_03 A"><a href="#row_03" title="03C">03A</a></li> </ul></div> Presently, i can select ONE. these codes are assigned to images, if selected they change color. But i just want help on MULTIPLE SELECTION. thanks Hello all, I need my form to submit to two sources, zoho crm and broker office. One is used to create a contact list and the other is an insurance quote engine. Problem one. How can I use javascript to force my form to submit data to both sites? The bigger problem is they use different names for the same field. In other words one wants to recieve a vaule as first_name and the other wants it as firstName. Thanks in advance. hi there, I'm looking for a method to use several hyperlinks to submit a form and then return the page within the link for example Code: <a href="thispage.php?mode=1" Onclick="javascript:form.submit();"> <a href="thispage.php?mode=2" Onclick="javascript:form.submit();"> the reason for this is so that no matter which link a user navigates to the form will be submitted and no data lost. however the above code obviously loses the POST info as the form action will be different from the a tag. Therefore I think maybe a way of creating a variable that changes the form action to match the a link selected (as the form(s) are submitted to the same php page. hope someone can think clearer than me! cheers Hello, I have 3 smaller thumbnail images and when I click on any of them, the resulting image displays in the larger image space. The tricky part is that I want the larger image to become a link that changes, depending on which image is displaying. (I don't want the little images to be links.) Click here for a visual to help explain what I am wanting to do. Here is what I have for script...but I can't figure out the links... Code: <script> function changeImage(filename) { document.main.src = filename; } </script> <table><tr><td><img name="main" src="images/4.gif"></td> <td> <a href="#" onClick="javascript:changeImage('images/1.gif')"><img src="images/11.gif"></a><br> <a href="#" onClick="javascript:changeImage('images/2.gif')"><img src="images/22.gif"></a><br> <a href="#" onClick="javascript:changeImage('images/3.gif')"><img src="images/33.gif"></a><br> </td></tr></table> This script works fine, but I can't figure out how to make the larger image have 3 separate links, depending on which image is displaying in it. Thanks for any help you can be! Hate to ask this as I know it's an easy one but surprisingly Google turns up no clear/simple answers! I'm modifying some old code and am not JS programmer (I'm a PHP programmer) and this is driving me nuts. The existing code makes sure that when the form is submitted that there isn't a missing value. There's also some hidden input values. The JS starts out function checkform(orderform) and the form tag includes onsubmit="return checkform(this);"> I can add an alert to the form to see varius input values, such as a hidden value for the input name 'description' I can use: alert (orderform.description.value) Eazy peazy. However the form has two different input type=image buttons now and I need to do some branching in the JS depending on which image button they press. I recall IE had an issue where it only sends the x and y coordinates So I figure an easy to determine which image button was pressed is just check to see if the x or y value for each button is non-zero. But I can't for the life of me figure out how to access the value. Example: alert (orderform.button1.x.value) doesn't work. Can someone refresh my memory or suggest an entirely different method for detecting which image button was used to submit a form? THanks in advance! Hi, I have a form that when you click submit gives a warning box asking if to continue code below Now when I type in the text field and press enter it doesn't submit nor does it pop up the warning box, how would I do this Code for submit button Code: <script LANGUAGE="JavaScript"> <!-- function submitMyForm() { var agree=confirm("ARE YOU SURE ?"); if (agree) return true ; else return false ; } // --> </script> Code: <form action="admin-delete.php" method="post" name="cp_delete" id="cp_delete"> <input type="text" name="cp_delete_bg" id="cp_delete_bg"> <input type="submit" name="submit" value="submit" onclick="return submitMyForm()"/> </form> Hi all Is using the real form submit button a problem in any way? Can it actaully send a form when a person uses 'enter' in a text field. When I use this submit, it triggers my validation which is great. Code: <input type="submit" value="OnSubmit validate" /> However this way doesn't seem to trigger my validation although It may solve the above form send problem (if that realy exists). How do I get it to act the same as real submit so it will trigger validation like onsubmit above? Code: <input type="button" value="Send Feedback" onclick="this.form.submit()" /> LT does any of that make sense? all ideas helpful and appreciated I have created some online software which uses form data to submit to another page. The problem is that I have other submit buttons in the same form which submit to different pages (depending on which button is pressed). The first submit button works fine but all the others only work once. Code: <input class="cssbutton" type='submit' value='Button1' onclick="wbform.action='page1.php'; target='mainFrame'; return true;"> <input class="cssbutton" type='submit' value='Button2' onclick="wbform.action='page2.php'; target='_blank'; return true;"> <input class="cssbutton" type='submit' value='Button3' onclick="wbform.action='page3.php'; target='topFrame'; return true;"> <input class="cssbutton" type='submit' value='Button4' onclick="wbform.action='page4.php'; target='topFrame'; return true;"> <input class="cssbutton" type='submit' value='Button5' onclick="wbform.action='page5.php'; target='_blank'; return true;"> <input class="cssbutton" type='submit' value='Button6' onclick="wbform.action='page6.php'; target='_blank'; return true;"> Any ideas my friends? I've got the following 2 fields in my form: <input type="file" name="filename" id="filename" value="filename"> <input type="submit" name="submit" value="Upload Image" /> Now I want to hide both of them as soon as the submit button is pressed. Problem is that I'm a javascript noob and I can't find it with google :S Can someone help me? Hi all, I'm designing something to addon to an existing product. I'm struggling with some javascript problems. I want to submit a hidden field when you click on an image button, rather than it being an actual submit button. It's going to submit the value "1" to a PHP page, but I don't want it to actually have to GO to the PHP page, just submit it within the webpage. Is this possible? Thanks I am trying to auto submit a login form remotely using .submit() . It's submitting, but for some reason if I use submit() the login isn't processing. However, if I turn off the auto submit and use an actual submit button it logs in just fine. Now, in the form tag there is a call onsubmit for some validation, does .submit() trigger that form onsubmit="" function? Is there something that happens differently when a user clicks a button verses the .submit(). Thanks! Paul Hi, I hope someone can help me. I'll be honest and say I don't know much about javascript, but am fairly comfortable in html. I am building a website that will have multiple image swaps on multiple pages. I am building this in wordpress, and I'm guessing that means my approach will be different than if I wasn't using wordpress. Here's how one page would work: There are 10 images shown. 1,2,3,4,5,6,7,8,9,10. When number 1 is clicked on, I want a new image - 1a. When 2 is clicked on, 2a. So there are 20 different images in all on a given page. Also, I want the user to be able to click on the image again to restore the original image. I would prefer onclick to onmouseover. There will be literally dozens of pages like this on the site, managed by wordpress, so hundreds of images to swap. Basically the first image is a question - the second image is the answer. Is this possible? Hi, I want submit a form when highlight options select value = true. I did the following code, but it not works. Could someone help me to fix it? Quote: <script type="text/javascript" language="JavaScript"> if onfocus="url.select()" Return true; { document.form1.submit(); } </script> stickers I have a basic understanding of Javascript, and I have posted here before. And my question is rather simple. I work for a company that moderates a virtual world. We have a mod tool but its kind of goofy. We have to edit a URL and then send the URL in a browser. It's a long and boring process. I am looking to have a basic form that puts all the required information together and submits it. What I can't figure out is how to submit a URL in javascript but not load it in a new window. This is a sample of what I currently use in another javascript used by the company: Code: theReport = replace(theReport,'\n','<br>'); var disp_setting="toolbar=no,location=no,directories=yes,menubar=yes,scrollbars=yes,width=480, height=640, left=400, top=0"; var docprint=window.open("","",disp_setting); docprint.document.open(); docprint.document.write('<html><head><title>Report Generator</title>'); docprint.document.write('</head><body>'); docprint.document.write(theReport); docprint.document.write('</body></html>'); docprint.document.close(); docprint.focus(); When the form below is submitted, I want the result page to open in the same window. I tried adding 'rel="nofollow" target=_self', but that didn't do the trick (Another option is to open the new page in a new window with pre-defined dimensions) Can someone help me out? Code: <form action="banner.php" name="fastbanner" method="post" > <TR> <TD align="center"> <table cellspacing="0" cellpadding="0" width="67%"> <tr> <td width="75%"> <TABLE summary="table" cellspacing="0" cellpadding="0" border="0" width="100%" align="center"> <TR> <TD class="border"> <TABLE summary="table" border="0" cellspacing="1" cellpadding="3" width="100%"> <TR> <TD colspan="5" class="header"> Select Your Banner. </TD> </TR> <TR> <TD class="main" colspan="5" align="center"> <select name="select_banner" onChange="showimage()"> <?php $open = opendir("banner"); while ($files = readdir($open)) { $filename = $files; if ($filename == "."){ print "\n"; } elseif ($filename == ".."){ print "\n"; } else { print "<option value=\"$filename\">$filename</option>\n"; } } ?> </select><br> <table cellspacing="0" cellpadding="0" width="484" summary="Banner Table"> <tr> <td rowspan="2"><img src="Yscala1.gif" width="16" height="79" border="0" alt=" " /></td> <td><img src="Xscala1.gif" width="468" height="15" border="0" alt=" " /></td> </tr> <tr> <td valign="top"><img ismap onclick="alert('Coordinates:\n\nX POS: '+self.event.offsetX+'\nY POS: '+self.event.offsetY);" name="banner" src="banner/ban01.png" width="468" height="60" /></td> </tr> </table> </TD> </TR> </TABLE> </TD> </TR> </TABLE><br> <TABLE summary="table" cellspacing="0" cellpadding="0" border="0" width="100%" align="center"> <TR> <TD class="border"> <TABLE summary="table" border="0" cellspacing="1" cellpadding="3" width="100%"> <TR> <TD colspan="1" class="header"> Pick your title text. </TD> </TR> <TR> <TD class="main" colspan="4"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100"><input name="titletext" value="YourSite" size="43" maxsize="80"></td><td><INPUT type="text" size="7" name="titlecolor" maxlength="7" value="#009900"></td> </tr> <tr> <td> <map name="colmap"> <area shape="rect" coords="1,1,7,10" href="javascript:showColor('#00FF00')"> <area shape="rect" coords="9,1,15,10" href="javascript:showColor('#00FF33')"> <area shape="rect" coords="17,1,23,10" href="javascript:showColor('#00FF66')"> [...] </map> <img usemap="#colmap" src="colortable.gif" border=0 width=289 height=67></td> <td><input name="titlex" type="text" value="54" size="3" maxsize="3">X Coordinates<br> <input name="titley" type="text" value="10" size="3" maxsize="2">Y Coordinates</td> </tr> </table> </TD> </TR> </TABLE> </TD> </TR> </TABLE><br> <TABLE summary="table" cellspacing="0" cellpadding="0" border="0" width="100%" align="center"> <TR> <TD class="border"> <TABLE summary="table" border="0" cellspacing="1" cellpadding="3" width="100%"> <TR> <TD colspan="1" class="header"> Pick your tag text. </TD> </TR> <TR> <TD class="main" colspan="4"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100"><input name="tagtext" value="This is my tagline." size="43" maxsize="80"></td><td><INPUT type="text" size="7" name="tagcolor" maxlength="7" value="#009900"></td> </tr> <tr> <td> <map name="colmap2"> <area shape="rect" coords="1,1,7,10" href="javascript:showColor2('#00FF00')"> <area shape="rect" coords="9,1,15,10" href="javascript:showColor2('#00FF33')"> [...] </map> <img usemap="#colmap2" src="colortable.gif" border="0" width="289" height="67"></td> <td><input name="tagx" type="text" value="54" size="3" maxsize="3">X Coordinates<br> <input name="tagy" type="text" value="30" size="3" maxsize="2">Y Coordinates</td> </tr> </table> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </td> </tr> </table><br /><br /> <div align="center"> <input type="submit" value="Create"> <input type="reset" value="Reset"> </div></TD> </TR> </TABLE> </TD> </TR> </form> Hi all, Im pretty new to HTML and Javascript so please bear with me if Im not explaining my problem well! I am building a website at work which has 2 frames, a main frame and a smaller frame at the side. In the smaller frame I have a text box and search button which will locate and open documents thats name match the text input. Everything seems to be working fine, however I have 3 problems.... 1) How do I complete the search by clicking enter instead of clicking the search button? 2) How do I get the text box to reset/clear after I have submitted a search? At present the entered text remains after I have completed the search 3) Can I get the text box to be selected and be ready for text input when I click on the frame that contains this? As it stands I have to click on the text box itself before I can enter text! Sorry for all the questions! As I said im pretty new to this and learning as I go along, so if you can point me in the right direction it will be greatly appreciated! Thanks Glen |