Jump to content

jug

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by jug

  1. Actually there are no header()s, the buttons are just submit buttons on HTML forms, so where would I specify where I want it to go?
  2. Hi I have a long php page containing forms which all carry out functions on my mysql database. When I submit a form, I want the page to refresh back in the same place, rather than back to the top. Does anyone know how I can do this? Thanks in advance Regards Jug
  3. So anyone got any idea what I can use that will work in IE and Firefox?
  4. Thanks for pointing that out. The error is: "window.event has no properties" on the first line of that function.
  5. function GetDetails() { var DetailsAll = window.event.srcElement.id; var WhereSpaceIs = DetailsAll.indexOf(" ") var NamePart = DetailsAll.substr(0, WhereSpaceIs) var AgePart = DetailsAll.substr(WhereSpaceIs) document.getElementById("NameDisplay").innerHTML = NamePart document.getElementById("AgeDisplay").innerHTML = AgePart } Basically I've got the name and age in the id tag and i'm separating them with a bit of string handling and displaying them in a table.
  6. This is not totally PHP but is related. I have a page which works in IE but not in Firefox, the page basically does the following: PHP Script outputs several images onto my page, and each of them have a unique id (from a mysql database) stored in the id tag. I have a javascript function which is called on mouse over of each image. This function gets the value of the id tag and display in a table below my images. In IE, this works, but in Firefox, the data isn't displayed in the table when I hover over the images. I'm guessing one of the features i'm using is not compatible with Firefox, can anyone tell me what it is and how I can overcome it. Thanks in advance Regards Jug
  7. Spot on - works perfectly Thanks! Jug
  8. I haven't really been using variables in the URL for my site, so is there any other way?
  9. Hi. I need to click an image and it to run some php script that sets a php variable and reloads the same page. I know it sounds simple but i've tried every different way I can think of and i'm guessing it's just something basic i've missed. I've tried onclick of the image, a href and a onclick, making the image the 'submit button' of a form etc.. Any response would be appreciated. Thanks in advance. Regards, Jug
  10. Right, all i want is where i have starred the code, is for the page to be redirected or just simply go to another page (ie the home page as they have logged in) I have looked everywhere but to be honest nothing has helped. I have tried some java-s and 'fopen' amongst other things but nothing seems to work. I just hope that the solution is so easy that it hasnt been posted online much. The script is below. Thanks in advance jug <?php $Message = ""; if(isset($_POST['Submit'])){   $AdminName = $_POST['AdminName'];   $AdminPass = $_POST['AdminPass'];     if($AdminName == "" || $AdminPass == "" ){     $Message = "You must fill in both boxes";   }else{     if($AdminName == "user && $AdminPass == "pass"){             ********//$Message = "Logged In";**************(goto "www.example.com)**********     }else{       $Message = "Incorrect username or password";     }   } } ?>
  11. <?php if(isset($_POST['imageField_x'])) {     $Username = $_POST['txtLogInUserName']     echo 'Welcome <i>' . $Username . '</i>, How are you today?<br /><br />'; } else { echo "Please fill out the form below, click submit when done<br /><br />"; } ?>   <div id="lyrLogin" style="position:absolute; left:578px; top:60px; width:166px; height:45px; z-index:20; visibility: visible;">   <form action="<?php echo $_SERVER['PHP_SELF']; ?>" " method="post" name="frmLogIn" id="frmLogIn">     <p align="left">       <input name="txtLogInUserName" type="text" id="txtLogInUserName">     </p>   <P>       <input name="imageField" type="image" src="login_button_up.gif" width="105" height="36" border="0" value="Submit" >     </p>   </form> </div> <img src="final_layout.jpg"> This is the new combined code - but still i get an error: Parse error: parse error in c:\program files\easyphp1-8\www\test.php on line 7 = which is = echo 'Welcome <i>' . $Username . '</i>, How are you today? Obviously i dont know whats up as its practically your code - please enlighten me of the problem many thanks in advance - jug ps also what does <i> </i> and ="<?php echo $_SERVER['PHP_SELF']; ?>" just for future reference
  12. <div id="lyrLogin" style="position:absolute; left:578px; top:60px; width:166px; height:45px; z-index:20; visibility: visible;">   <form action="<?php echo $Username; ?>" method="post" name="frmLogIn" id="frmLogIn">     <p align="left">       <input name="txtLogInUserName" type="text" id="txtLogInUserName">     </p>   <P>       <input name="imageField" type="image" src="login_button_up.gif" width="105" height="36" border="0" value="Submit" onClick="<?php $Username = $_POST['txtLogInUserName']; ?>" >     </p>   </form> </div> <img src="final_layout.jpg"> Alright i have a layer which includes an image and a text box - all i want to do is when they click the image whatever they have typed into the text box will be echo-ed out. I am a total newbie and will allow anyone to laugh at the code but just cant think why this isnt working - makes sense to me any response will be much appreciated cheers -- jug
  13. Right i guess this is very simple but i dont have a clue really what im doing - i have tried using the search feature but i guess as its so simple no one has asked before. How do you set a variables value from what is input to a text box and how do you use the value once declared and put it into another text box? any help would be appreciated and hopefully start me off cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.