Solved

How to refresh a page from an onchange command to go back to the position from where they were before?

Posted on 2007-12-04
25
1,282 Views
Last Modified: 2012-06-27
I have some php drop down boxes that use a 'onchange' command from javascript.  I was wondering how to make the page to refresh at the position it was at before the onchange command was called instead of refreshing to the top of the page?  Any thoughts?
0
Comment
Question by:eiseng
  • 12
  • 12
25 Comments
 
LVL 19

Expert Comment

by:erikTsomik
ID: 20406503
you can try adding this line in your JS document.forms[0].refresh;
0
 

Author Comment

by:eiseng
ID: 20406556
Where would I add that line of code if this was the command?
<SCRIPT language=JavaScript>

function reload(form)

{

var val=form.customer.options[form.customer.options.selectedIndex].value;
 

self.location='test.php?customer=' + val ;

}

Open in new window

0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20406921
eiseng,

You might want to clarify what you are doing.  What do you do with the onchange event?  I read this a little different and thought you just wanted to get the "focus" back to the next field element.  Is that true?  If so the basic idea would be with focus() in Javascript.  I need to know what the onchange event does to provide details but the focus method would be used like ...

document.forms[0].field2.focus();

Let me know if you have any questions or need more information.

b0lsc0tt
0
 

Author Comment

by:eiseng
ID: 20407005
I have two drop down php boxes with javascript.  I select the value in the first and the page reloads to populate the second with options.  I would like to know how to make the screen stay where the drop boxes are instead of having to scroll back down the page to view or select the other option.


<SCRIPT language=JavaScript>

function reload(form)

{

var val=form.customer.options[form.customer.options.selectedIndex].value;

self.location='test2.php?customer=' + val ;

}

</script>
 

<table align="center" cellspacing="5">

<tr>

<td><div align="center">Customer</div></td>

</tr>

<tr>

<td><div align="center">

<?

@$EIStable=$_GET['customer']; 

$qryCust=mysql_query("SELECT DISTINCT customer,customer_id FROM Customers order by customer"); 

						 

if(isset($EIStable)){

$qryProj=mysql_query("SELECT DISTINCT project,project_id FROM Projects where customer_id=$EIStable order by project"); 

} 

						

echo "<select name='customer' onchange=\"reload(this.form)\"><option value=''>Select one</option>";

while($Custarray = mysql_fetch_array($qryCust)) { 

if($Custarray['customer_id']==@$EIStable){echo "<option selected value='$Custarray[customer_id]'>$Custarray[customer]</option>"."<BR>";}

else{echo  "<option value='$Custarray[customer_id]'>$Custarray[customer]</option>";}

}

echo "</select>";

?>

</div></td>

</tr>

<tr>

<td><div align="center">Project</div></td>

</tr>

<tr>

<td><div align="center">

<?

echo "<select name='project'><option value=''>Select one</option>";

while($Projarray = mysql_fetch_array($qryProj)) { 

echo  "<option value='$Projarray[project_id]'>$Projarray[project]</option>";

}

echo "</select>";

?>

</div></td>

</tr>

<tr>

<td><input type="submit" name="submit" value="Query Database"></td>

</tr>

</table>

Open in new window

0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20407328
Thanks for the details.  You need to have the php script (page2.php I think) send Javascript code in the html.  That code could be as simple as something like ...

<body onload="document.forms[0].project.focus();">

I assumed project was the name for the second select, the one you want to go to after the reloads.  That javascript will do it and your php script can put it in the page.

Let me know if you have a question about this.

bol
0
 

Author Comment

by:eiseng
ID: 20407501
So I put <body onload="document.forms[0].project.focus();"> in place of the orginal body tag?  I tried it and it still won't go back to the original position.  Just refreshes to the top of page.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20407613
Yes, it should replace it.  Make sure there is only one body tag.

Check the html source (i.e. View Source) in the browser and look for any script errors.  Let me know what browser your are using if you have a question about this.

Do you have more than one form?  Is there a form tag?  I assume so but there wasn't one in the code above.  Let me know about any errors and post the html source for that part of the page here if you can't find the issue.

Let me know if you have a question.  One other way to do it (not as good) would be to use the hash (i.e. #part2 in the URL).  You would use html like ...

 <a name="part2"></a>

to make an anchor.  The returning URL would just need to end with #part2 for the browser to go to the part of the page with that anchor.  It isn't as good as focus since we are using a form and form fields.

bol
0
 

Author Comment

by:eiseng
ID: 20407674
I have a total of 4 forms , two with dependent drop downs and two with submit buttons.  I really just would like the two forms with the drop boxes to load back where those forms are.  Let me know what you think.  Thanks
<? 

session_start();

$username = $_SESSION["username"]; 

include "../level1_check.php";
 

$qryEmp=mysql_query("SELECT employee FROM Employees order by employee");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">

<!--

body {

	background-color: #CCCCCC;

}

.style1 {

	font-weight: bold;

	color: #00255e;

}

.style2 {color: #00255e}

-->

</style>

<link href="../calender.css" rel="stylesheet" type="text/css">

 <script language="javaScript" type="text/javascript" src="../calender_date_picker.js"></script>

<SCRIPT language=JavaScript>
 

function reload(form)

{

var val=form.customer.options[form.customer.options.selectedIndex].value;

self.location='project_bom.php?customer=' + val ;

}
 

function reload4(form)

{ 

var val1=form.vendor.options[form.vendor.options.selectedIndex].value;
 

self.location='project_bom.php?vendor=' + val1 ;

}

function reload5(form)

{
 

var val1=form.vendor.options[form.vendor.options.selectedIndex].value;

var val2=form.manufact.options[form.manufact.options.selectedIndex].value;
 
 

self.location='project_bom.php?vendor=' + val1 + '&manufact=' + val2 ;

}

function reload6(form)

{

var val1=form.vendor.options[form.vendor.options.selectedIndex].value;

var val2=form.manufact.options[form.manufact.options.selectedIndex].value;

var val3=form.part_num.options[form.part_num.options.selectedIndex].value;
 
 

self.location='project_bom.php?vendor=' + val1 + '&manufact=' + val2 + '&part_num=' + val3 ;

}

</script>

<style type="text/css">

<!--

.style3 {

	font-size: 24px;

	font-family: "Times New Roman", Times, serif;

}

-->

</style>

</head>
 

<body>

<div id="loading"></div> 

<table width="768" border="0" align="center" cellpadding="5" cellspacing="5">

	<tr>

		<td align="left"><a href="../../login_home.php">Home</a></td>

		<td align="center"><a href="../../index.html">EISengineering.com Home Page</a></td>

		<td align="right"><a href="logout.php">Logout</a></td>

	</tr>

    <tr>

      <td width="768" colspan="4"><img src="../../images/topbanner.jpg" alt="Educate | Inspire | Innovate - EISengineering" border="0"></td>

  	</tr>

	<tr>

		<td align="center" colspan="3" height="50"><div class="style4 style2 style3">Welcome <?php echo $username; ?></div></td>

	</tr>

	<tr>

		<td align="center"><a href="project_data.php">Insert Project Data Information </a></td>

		<td align="center"><a href="emp_reports.php">Employee Hours Report </a></td>

		<td align="center"><a href="change_pass.php">Change Password</a></td>

	</tr>

</table>

<br>

<div align="center">

<?

@$EIStable=$_GET['customer']; 

$qryCust=mysql_query("SELECT DISTINCT customer,customer_id FROM Customers order by customer"); 

 

if(isset($EIStable) and strlen($EIStable) > 0){

$qryProj=mysql_query("SELECT DISTINCT project FROM Projects where customer_id=$EIStable order by project"); 

}  
 
 

$qryVen=mysql_query("SELECT DISTINCT vendor,vendor_id FROM Vendors order by vendor"); 
 
 

$EIStable3=$_GET['vendor'];

if(isset($EIStable3) and strlen($EIStable3) > 0){

$qryMfc=mysql_query("SELECT DISTINCT manufact,manufact_id FROM Manufactures where vendor_id=$EIStable3 order by manufact"); 

}
 

$EIStable4=$_GET['manufact'];

if(isset($EIStable4) and strlen($EIStable4) > 0){

$qryPart=mysql_query("SELECT DISTINCT part_num,part_id FROM Parts where manufact_id='$EIStable4' order by part_num"); 

}
 

$EIStable5=$_GET['part_num'];

$sql="SELECT DISTINCT descr,price FROM Parts where part_id='$EIStable5'";

$result=mysql_query($sql);

$rows=mysql_fetch_array($result);  

?>

</div>

<table align="center">

	<tr>

		<td>

		<form action='<? echo $PHP_SELF; ?>' method="post">

			<table align="center" cellspacing="5">

				<tr>

					<td align="center">Customer</td>

				</tr>

				<tr>

					<td align="center">

					<?

						@$EIStable=$_GET['customer']; 

						$qryCust=mysql_query("SELECT DISTINCT customer,customer_id FROM Customers order by customer"); 

						 

						if(isset($EIStable)){

						$qryProj=mysql_query("SELECT DISTINCT project,project_id FROM Projects where customer_id=$EIStable order by project"); 

						} 

						

						echo "<select name='customer' onchange=\"reload(this.form)\"><option value=''>Select one</option>";

						while($Custarray = mysql_fetch_array($qryCust)) { 

						if($Custarray['customer_id']==@$EIStable){echo "<option selected value='$Custarray[customer_id]'>$Custarray[customer]</option>"."<BR>";}

						else{echo  "<option value='$Custarray[customer_id]'>$Custarray[customer]</option>";}

						}

						echo "</select>";

					?>

					</td>

				</tr>

				<tr>

					<td align="center">Project</td>

				</tr>

				<tr>

					<td align="center">

					<?

						echo "<select name='project'><option value=''>Select one</option>";

						while($Projarray = mysql_fetch_array($qryProj)) { 

						echo  "<option value='$Projarray[project_id]'>$Projarray[project]</option>";

						}

						echo "</select>";

					?>

					</td>

	    		</tr>

				<tr>

					<td><input type="submit" name="submit" value="Query Database"></td>

				</tr>

			</table>

			</form>

		</td>

		<td width="400">&nbsp;</td>

		<td>

		<form name="BOM.php" method="post">

			<table align="right" cellspacing="5">

				<tr>

					<td align="center"><input type="button" name="bom" value="Build BOM"></td>

					<td align="center"><input type="button" name="rfq" value="Build RFQ"></td>

				</tr>

				<tr>

				  <td align="center" nowrap><a href="">View BOM</a></td>

					<td align="center"><a href="">View RFQ</a></td>

				</tr>

		  </table>

		  </form>

		</td>

	</tr>

</table>

<form action='' method="post">

<table align="center" border="1" cellspacing="1">

	<tr>

	  <td align="center"nowrap>Vendor  <a href="add_vendor.php"><img src="../../images/plus.gif" alt="Click here to add Vendor" border="0"></a></td>

		<td align="center" nowrap>Manufacturer  <a href="add_manufacturer.php"><img src="../../images/plus.gif" alt="Click here to add Manufacturer" border="0"></a></td>

		<td align="center" nowrap>Part  <a href="add_parts.php"><img src="../../images/plus.gif" alt="Click here to add Part" border="0"></a></td>

		<td align="center" nowrap>Descriptions</td>

	  	<td align="center" nowrap>Quantity</td>

		<td align="center" nowrap>Price</td>

		<td align="center" nowrap>Special Note</td>

	</tr>

	<tr>

		<td align="center">

		<?

			echo "<select name='vendor' onchange=\"reload4(this.form)\"><option value=''>Select one</option>";

			while($Venarray = mysql_fetch_array($qryVen)) { 

			if($Venarray['vendor_id']==@$EIStable3){echo "<option selected value='$Venarray[vendor_id]'>$Venarray[vendor]</option>"."<BR>";}

			else{echo  "<option value='$Venarray[vendor_id]'>$Venarray[vendor]</option>";}

			}

			echo "</select>";

		?>

		</td>

		<td align="center">

		<?

			echo "<select name='manufact' onchange=\"reload5(this.form)\"><option value=''>Select one</option>";

			while($Mfcarray = mysql_fetch_array($qryMfc)) { 

			if($Mfcarray['manufact_id']==@$EIStable4){echo "<option selected value='$Mfcarray[manufact_id]'>$Mfcarray[manufact]</option>"."<BR>";}

			else{echo  "<option value='$Mfcarray[manufact_id]'>$Mfcarray[manufact]</option>";}

			}

			echo "</select>";

		?>

		</td>

		<td align="center">

		<?

			echo "<select name='part_num' onchange=\"reload6(this.form)\"><option value=''>Select one</option>";

			while($Partarray = mysql_fetch_array($qryPart)) { 

			if($Partarray['part_id']==@$EIStable5){echo "<option selected value='$Partarray[part_id]'>$Partarray[part_num]</option>"."<BR>";}

			else{echo  "<option value='$Partarray[part_id]'>$Partarray[part_num]</option>";}

			}

			echo "</select>";

		?>

		</td>

		<td align="center"><? echo $rows['descr']; ?><input type="hidden" value="<? echo $rows['descr']; ?>" name="descr"></td>

		<td align="center"><input type="text" name="quan" id="quan" size="6"></td>

		<td align="center"><? echo $rows['price']; ?><input type="hidden" value="<? echo $rows['price']; ?>" name="price"></td>

		<td align="center"><input type="text" value="" name="spc_note"></td>

	</tr>

	<tr>

		<td colspan="7" align="center"><input type="submit" name="submit" value="Submit Form"></td>

	</tr>

</table>

</form>

<form action='<? echo $PHP_SELF; ?>' method="post">

<table align="center" cellspacing="1">

	<tr>

		<td>

<table align="center" cellspacing="1">

	<tr>

		<td align="center">

  			<strong>BOM View and Edit Edit Screen</strong> 

   		 	<?php

               if ($_POST['submit']=='Query Database'){

               $sql2="SELECT * FROM project_bom WHERE customer_id='" . $customer . "' AND project_id='" . $project . "' ORDER BY date";

			   $result2=mysql_query($sql2) or die(mysql_error());

               $count=mysql_num_rows($result2);

			   }

			   ?>

		</td>

 	</tr>

	<tr>

		<td>

			<table border="1" cellspacing="0" cellpadding="3">

				<tr>

				  <td align="center" colspan="9" nowrap><strong>EISengineering Project Data</strong></td>

				</tr>

				<tr>

					<td align="center" nowrap><strong>Delete</strong></td>

					<td align="center" nowrap><strong>Id</strong></td>

					<td align="center" nowrap><strong>Date</strong></td>

					<td align="center" nowrap><strong>Vendor</strong></td>

					<td align="center" nowrap><strong>Manufacturer</strong></td>

					<td align="center" nowrap><strong>Part Number</strong></td>

					<td align="center" nowrap><strong>Quantity</strong></td>

					<td align="center" nowrap><strong>Price</strong></td>

					<td align="center" nowrap><strong>Update</strong></td>

				</tr>

				<?

				if ($_POST['submit']=='Query Database'){

				while($rows2=mysql_fetch_array($result2)){

				?>

				<tr>

				  <td align="center" nowrap><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows['id']; ?>"></td>

					<td nowrap align="center"><? echo $rows2['id']; ?></div></td>

					<td nowrap align="center"><? echo $rows2['date']; ?></td>

					<td nowrap align="center"><? echo $rows2['vendor']; ?></td>

					<td nowrap align="center"><? echo $rows2['manufact']; ?></td>

					<td nowrap align="center"><? echo $rows2['part_num']; ?></td>

					<td nowrap align="center"><? echo $rows2['quantity']; ?></td>

					<td nowrap align="center"><? echo $rows2['price']; ?></td>

					<td align="center" nowrap><a href="update_proj_data_form.php?id=<? echo $rows['id']; ?>">update</a></td>

				</tr>

				<?php

				} }

				?>

			</table>

		</td>

	</tr>

</table>

<table align="center">

	<tr>

		<td colspan="5" align="center"><input name="delete" type="submit" id="delete" value="Delete Records"></td>

	</tr>

</table>

		</td>

	</tr>

</table>

</form>

<center>

<?

 

if($delete){

for($i=0;$i<$count;$i++){

$del_id = $checkbox[$i];

$sql3 = "DELETE FROM $tbl_name WHERE id='$del_id'";

$result3 = mysql_query($sql3);

}
 

if($result3){

echo "<meta http-equiv=\"refresh\" content=\"0;URL=test.php\">";

}

}

mysql_close();

?>

</center>

</body>

</html>

Open in new window

0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20408089
Thanks for the info.  The code should help too but the html source is usually a little more helpful.  I'll let you know if I need that though.  Hopefully this will work.

Did you get any error messages?  What browser are you using?  Look for Javascript or Script errors and let me know what you find.

I'll take a look at the code.  There is a lot to digest. :)

bol
0
 

Author Comment

by:eiseng
ID: 20408125
Error: document.forms.0.vendor is null or not an object.

IE7 is the browser I use.  (i think that is what you are wanting to know)
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20408154
Thanks for that info.  That was what I asked for.

Let me see the html source for the page (when it comes back).  It seems like the problem is a typo.

One other possible cause though is the html.  I don't believe it will validate as it is.  For example some of the form tags (including the one we need) are missing required attributes/properties.  For example the form name.  You should also include the id too.  Both need to be unique from other name/ids on the page.   You an use the same value for name and id but not 2 elements with the same id.

Invalid html will cause various problems but can also make the script have a hard time "finding" the elements.  Let me see the html source for the page when it comes back, at least the body tag, and I'll know if that is the problem.

bol
0
 

Author Comment

by:eiseng
ID: 20412701
When you say the html source do you mean do a view source on the page after it reloads?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20413430
Yes.  The content you see when you choose View Source in the browser.  This would be done after the page reloads so we could see the script that is trying to "move" the page.

bol
0
 

Author Comment

by:eiseng
ID: 20420730
I just see the top of the page on the view source.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20421754
What do you mean?  Is there a scroll bar?  The source can often fill more than would fit in a window so you have to scroll down to see more.

Can you post the html, at least the section we are interested in?

bol
0
 

Author Comment

by:eiseng
ID: 20421809
Sorry I didn't understand the last comment you made.  

In this part of the code I tried to refresh where the delete button is but is says Expected Identifier when I load the page.  But if I put it on a Submit button just above the this form then it works fine.

 I have the code as this for the submit button

<body onload="document.form3.submit.focus();">

Code for the delete button

<body onload="document.form4.delete.focus();">
<form action='<? echo $PHP_SELF; ?>' method="post" name="form4">

<table align="center" cellspacing="1">

<tr>

<td>

<table align="center" cellspacing="1">

<tr>

<td align="center">

<strong>BOM Database Query</strong>

</td>

</tr>

<tr>

<td>

<table border="1" cellspacing="0" cellpadding="3">

<tr>

<td align="center" colspan="11" nowrap><strong>EISengineering Project BOM </strong></td>

</tr>

<?php

if (($query == "Query Database") && ($project) && ($customer)) {

$sql2="SELECT * FROM project_bom WHERE customer='$customer' AND project='$project' ORDER BY date;";

$result2=@mysql_query($sql2) or die(mysql_error());

$count=@mysql_num_rows($result2);

}

?>

<tr>

<td align="center" nowrap><strong>Delete</strong></td>

<td align="center" nowrap><strong>Id</strong></td>

<td align="center" nowrap><strong>Date</strong></td>

<td align="center" nowrap><strong>Vendor</strong></td>

<td align="center" nowrap><strong>Manufacturer</strong></td>

<td align="center" nowrap><strong>Part Number</strong></td>

<td align="center" nowrap><strong>Description</strong></td>

<td align="center" nowrap><strong>Quantity</strong></td>

<td align="center" nowrap><strong>Price</strong></td>

<td align="center" nowrap><strong>Special Note</strong></td>

<td align="center" nowrap><strong>Update</strong></td>

</tr>

<?

if ($count >= 1){

while($rows2=mysql_fetch_array($result2)){

?>

<tr>

<td align="center" nowrap><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows2['id']; ?>"></td>

<td nowrap align="center"><? echo $rows2['id']; ?></div></td>

<td nowrap align="center"><? echo $rows2['date']; ?></td>

<td nowrap align="center"><? echo $rows2['vendor']; ?></td>

<td nowrap align="center"><? echo $rows2['manufact']; ?></td>

<td nowrap align="center"><? echo $rows2['part_num']; ?></td>

<td nowrap align="center"><? echo $rows2['descr']; ?></td>

<td nowrap align="center"><? echo $rows2['quantity']; ?></td>

<td nowrap align="center"><? echo $rows2['price']; ?></td>

<td nowrap align="center"><? echo $rows2['spc_note']; ?></td>

<td align="center" nowrap><a href="update_proj_bom_form.php?id=<? echo $rows2['id']; ?>">update</a></td>

</tr>

<?php

} }

?>

</table>

</td>

</tr>

</table>

<table align="center">

<tr>

<td colspan="5" align="center">

<input name="delete" type="submit" id="delete" value="Delete Records"></td>

</tr>

</table>

</td>

</tr>

</table>

</form>

Open in new window

0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20421968
Is this still the same question?  I thought you were trying to get the cursor and the browser focus to go to the second drop down after the page has reloaded.  Is that correct?  I don't see a select list (i.e. drop down) in the code you just posted.

What wasn't clear in my last comment?  Your last two comments have completely confused this issue for me.  Let me know if I misunderstood the question but you will need to provide details.  It might help to reread our previous comments to see what we have said.  I have done so and I don't see how your last comment relates to the others and the question.

bol
0
 

Author Comment

by:eiseng
ID: 20422165
Yes, I did want to refresh the page at the drop down boxes.  I played around with it and got it to work with the body tag.  But I didn't like that it placed the drop boxes to the bottom where it would just be enough to see the drop box.  I used the tag for that situation:

<body onload="document.form3.vendor.focus();">

Then I tried to get it farther down so that it would give more room from the bottom to the drop boxes.  Then I changed it to

<body onload="document.form3.submit.focus();">

Sorry I confused the subject.  Its probably still confusing.  I just wanted it to refresh where the second drop boxes would be in sight, but I didn't like the placement when I got it to work. Now I just want it to refresh down to the bottom of the page.  That would be the best solution.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20422306
Then use an anchor tag to "name" that part.  I mentioned this in an earlier comment and provided an example.  Let me know if you have a question about using it though.

I wouldn't try to use another form element though, especially a button that might accidently get "clicked" because of the focus. :)  The named anchor will work great.

bol
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20422313
By the way, thanks for clearing this up.  I thought I was losing my mind. :D

bol
0
 

Author Comment

by:eiseng
ID: 20422715
Sorry about the confusion.  So if I use an anchor tag, would that go with a <a href></a> tag for a link? I read a little about them but wasn't to sure how to implement one in the page.
0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 20423482
No problem.  You aren't quite right on how you would use it but let me try to clarify it.

You use a named anchor.  The tag is something like ...

<a name="thespot"></a>

That tag can go around an element or even text but doesn't need to.  It is most often used just like that (i.e. empty) at the top of the section.  When used the browser will try to place the tag at the top of the browser window.  Of course if it is close to the bottom then this isn't possible.

You can see examples of its use in the Help section of this site.  Click on one the topics and the browser will use a named anchor to scroll down and show you that part of the page.  Another example of this would be to click on http:#20406921 to take you to my first comment in this question.

To use it you would change the URL you use to "refresh" the page.  You just add "#thespot" (no quotes) to the end of the URL.  Using the code you provided earlier I think it would be something like ...

self.location='test.php?customer=' + val + '#thespot' ;

Of course you can use whatever you want for the name.  Let me know if you have a question or need more info.

bol
0
 

Author Comment

by:eiseng
ID: 20423714
Thanks I will you have been a great help.  I will try it out.
0
 

Author Comment

by:eiseng
ID: 20423987
It works. Thanks for you time.  I appreciate it very much.  
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20424159
Great!  Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now