HTML - How To Pass A Variable In My Url To The Next Page
Hi!
I would like to know how do I pass a variable in my URL to the next page. HTML Code: For example, my URL is: http://www.mysite.com?source=google I'm using this form code to go to the next page: <form action="http://www.mysite.com/next-page.html" method="get" name="form"> <input type="text" name="zipcode" maxlength="5" id="zipcode" /> <br /> <input type="submit" id="button" value="Go"/> </form> So the next page URL will be: http://www.mysite.com/next-page.html?zipcode=11111 I want that the variable "google" will be also in this URL: http://www.mysite.com/next-page.html?zipcode=11111&source=google How I do that? Thanks, Steve Similar TutorialsHI everyone, I am in process of creating a sample page. I need to pass values from one HTML page and i should get those values in other page. For example i have used two sample pages like, sample.html l<html> <head> <title> My first page </title> </head> <body> <a href="sample1.html" id="1001">Welcome to html </a> </body> </html> sample1.html <html> <head> <title> My second page </title> </head> <body> <a href="sample1.html">Sample HTML page values came here</a></body> </html> I have used those two sample pages and i need to get the value of id="1001" in sample 1.html page could anyone help me to solve this problem. Thanks in advance Regards, Martin Hi, I have a PHP script I am writing which displays a list of all the news posts I have made on my site and to the right of it has two links, Edit and Delete. The script will iterate through all the news posts I have made and display them down the page from most recent to oldest, it looks like this: The way it works at the moment is that when each headline gets added, the script will set the edit link for that particular post to <a href="EditSelectedPost.php?$i">Edit</a> $i being the ID to that post. I want it so that when I get sent to EditSelectedPost.php I can pluck off the value of $i and use it on that page. I want to be able to do this without using forms or buttons. Can this be done? Any help will be greatly appreciated. Thanks Ashman Hi. This is something I have pondered on for a very long time and wish to know how to resolve. I have no idea if it is possible but I think I have seen it done before. I need a piece of code for a frame that will automatically readjust itself to the page that is targeted in the frame, but will only go so far as the parameters I set it to. To me, it sounds like a rather complicated code and I'm really not sure whether it is possible, but if it is, it would be extremely useful for forum pages that are set to be inside a webpage. What I want to achieve with this, is to have the frame to be able to extend itself inside the page, without putting a scrollbar on the actual frame. The page I have isn't actually structured with frames, so I would like to keep it that way. I have no idea if this IS possible but I would like to know. Thanks, KGB. Hi, am trying to show a page in a HTML <iframe> but before loading that page I want to set a variable value. I tried following: <iframe src="slgrid/ccustomer.php?id=" <? echo $cat; ?> "width="100%" height="100""></iframe> but can not get the value of id using $_GET['id'] Any other ideas are also welcome please. I am a little new in PHP and HTML. Any help in this regard will be appreciated. Thanks and regards, So, still rather new to writing HTML. I'm looking to put either a text field or drop down box onto the page dependent on a previously defined variable. How do I go about doing that? I want to pass the value from 'event.clientX' of the html line: "alert(event.clientX)" to a javascript. Right there on the same page. How can I do that? regards, ab good grief, hunting around I run across the fascinating information that 'alert' IS javascript ! Then how come this works: <html> <head> <title>Event</title> </head> <body onclick="alert(event.clientX + ' x ' + event.clientY)"> </body> </html> ? Javascript can be embedded in html and doesn't need that "<script language="javascript">" business? god almighty, what's going on............? I am wanting to create a booking form for my website, before you can make a booking you have to be able to check is available in your area. So I am wanting to be able use one form where you can enter all the required details and when you enter a postcode you click check, which will give a pop up box saying if someone is available or not. The problem I have found is if I use a link then the PHP code doesn't get any values from the form, if I use a submit button it does pass the value but the popup only comes up for a split second. Here is the code for the form as I said if I click the Check Button, it passes the value but only shows the pop up for a second, If you click "Find Driver" first it shows the Pop up but it is blank as It doesn't get the value from the form. If you click check and then Find driver it works fine, but I am wanting to find a solution by only using one click. HTML Code: <div id="form"> <form name="f1" method="post"/> <p> ID: <br/> <input name="ID" type="text" value="Leave Blank" /> </p> <p> Name: <br/> <input name="Name" type="text" /> </p> <p> Address: <br/> <input name="Address" type="text" /> </p> <p> Postcode:<br/> <input name="Postcode" id="Postcode" type="text" /> <input type='Submit' value='Check' onclick="popup('popUpDiv')" /> <p><a href="#" onclick="popup('popUpDiv')">Find Driver</a></p> </p> <p> Telephone: <br/> <input name="Telephone" type="text" /> </p> <p> Mobile: <br/> <input name="Mobile" type="text" /> </p> <p> AltTelephone: <br/> <input name="AltTelephone" type="text" /> </p> <p> Email: <br/> <input name="Email" type="text" /> </p> <p> Date: <br/> <input name="Date" type="text" /> </p> <p>Notes: <br/> <input name="Notes" type="text" /> </p> <p> CompanyNotes: <br/> <input name="CompanyNotes" type="text" /> </p> <p> Payment: <br/> <input name="Payment" type="text" value="Leave Blank for 0" /> </p> <p> <input type="submit" Value='Book' onclick="f1.action='insert.php'; return true " /> <!--<div id="wheel"><a href="instructorSearch.php"onClick="return popup(this, 'notes')"><img id="mainLogo" src="im/wheel.png" alt="Driving School Logo" /></a></div> !--> </p> <p><input type="submit" Value='Enquire' onclick="f1.action='insertEnquire.php'; return true " /> </form> Hi, I know how to make a username and password input form, and the submit button that is not the problem. My problem is that I have designed a background in PS.http://photoupload.org/uploads/13269813681.jpg And before anyone *****es at my for putting 'Shrimps' yes I know it is wrong. But this is for a gaming team I am in, and none of them are English. And they think that Shrimps sounds and looks better than Shrimp even though Shrimp is the correct plural. Anyway Back to the matter at hand. If you look at the background I designed, in the top left it has two boxes which is where I want to put the user and pass forms. But I don't want the boxes that naturaly come with the forms. And for the life of my I can't figure it out, I don't know weather it is HTML, XML or CSS, any help on how to get rid of the boxes that come with that would be highly appreciated, Thanks //Dave Hi created the following code: 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>validation</title> </head> <body> <ul> <li><a href="#">item1</a></li> <li><a href="#">item2</a></li> <ul> <li><a href="#">item2a</a></li> <li><a href="#">item2b</a></li> </ul> </ul> </body> </html> unfortunately it doesn't pass validation. Apparently, a "ul" elenent cannot be inserted into another "ul". So, how do i create a cascading menu? Thanks Hi all! I'm trying to pass an array as a hidden field from a form in the URL of the browser but it's not working. Can you tell me what is wrong with this...it's my first attempt so be gentle The form HTML is <form name="filter" action="http://www.myurl.com" method="get"> <input type="hidden" name="main_page" value="index" /> <input type="hidden" name="Flt_Grade[]" value="100" /> <select name="filter_id" onchange="this.form.submit()"> <option value="1">Most Popular</option> <option value="2" selected="selected">Price: Low to High</option> <option value="3">Price: High to Low</option> <option value="4">Title</option> <option value="6">Date Added: Newest</option> <option value="7">Date Added: Oldest</option> </select> </form> I would expect, when option 4 in the dropdown is selected the URL to be http://www.myurl.com&main_page=index...00&filter_id=4 Where %5B = [ and %5D = ] But what I actually get is http://www.myurl.com&main_page=index...e=&filter_id=4 The Flt_Grade array is not passed properly. Can this be done so the hidden field is passed in the URL as an array? Thank you! Hey everyone! So after ruling out more complex Java implementations of passing a string onto the end of a static link, I'm attempting to do the same using <form> and onclick but am having difficulties. What I am trying to do is simple. There will be a form box where the user enters their ZIP CODE and then clicks a button 'Go'. Once clicked, I'd like to open a separate window (or possibly leave everything in the same window-not important) where the 'zip code' string (ie: 12345) is attached to the end of a static link (ie www.website.com/zip= ) to direct the user to the link 'www.website.com/zip=12345' I realize this is a simple idea, but thus far tutorials have lost me. This is the code that I have, but I admit it is a mess and might just be a better idea to ignore it: Code: <form> <input type="text" maxlength="8" name="zip" style="color:#555555;" value="Your ZIP" class="cleardefault" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip"> <input type="button" value="Go!" onclick="http://www.t-mobile.com/coverage/pcc.aspx?zip="+zip" > </form> Again, I know this is very n00bish and annoying, but if you could help I'd greatly appreciate the time! Hi, I am trying to accurately code a swf header into my website. I don't have the knowledge to arrange the code so it passes html validation. The following link will take you to the site and validation results. http://validator.w3.org/check?uri=ht...sale.net.au%2F And here a link to the website http://www.bikesforsale.net.au Any help or guidance will be gratefully received Cheers Ron hiii all, i am making 2 html pages. one is parent window and another is child window but i want, when i click on a link of child window , parent page will load but with diff frame on parent page i am able to reload the parent pag but the same form will appear so how can i load diff form when parent page is reload?? please mention code for both child and parent page and i am using html e\with java script please reply thanks My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the 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" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> Hi, Background: I have a small page that need to be embeded into a bounch of other html pages. Help needed: 1. Please provide the html chunk that I can use to embed the small page in to other html pages. 2. Is there a way of not using iframe? Can I use <Object> or <embed>? How? --------------------------- mba colleges in london hospitality management diploma Some mouses today have horizontal scroll, some call the tilt. It looks something like: http://www.htmlforums.com/attachment...1&d=1242556560 I noticed that many websites they code those horizontal scroll to go to next/prevous page. For example Discuz! forum system has this function. While you browse hundreds or thousands of posts separated into pages, the horizontal scroll can take you to previous page or next page.(not browser back/forward) How do I code like that? Or any examples? Below are the two sites I will use to explain my problem. For reference, I used Mozilla Firefox 3.08 and Google Chrome 1.0.154.53 in my tests. Example 1: http://www.irishbyname.com/example1.htm Example 2: http://www.irishbyname.com/example2.htm When browsing the site in a browser other than Internet Explorer, example 1 and example 2 center to different locations on the page. In example 1, I set the height of the content area to be 200 px tall. In example 2, I set the height of the content area to be 500 px tall. When I have example 1 open in one tab and example 2 open in another, I can alternate between the two tabs and see a visual difference in alignment. The HTML code on both pages is exactly identical with the exception of the height of the content area. Can anyone tell me why the horizontal page center changes based on the height of the page? Can anyone tell me how to change my HTML to make certain the page centers correctly no matter how tall the page is? Thanks for your help in advance. |