bccamp
Technical User
- Jan 20, 2005
- 69
Ok, I've had this post over on the html forum trying to get through it and, although they have been great, I can't get this to work. I thought it was an html problem, but I'm going to see if the php people can help.
I've got a page with 4 'Calculate' buttons derived from a function:
I'm trying to get the page, upon reloading itself, to go back to the original position of the 'Calculate' button that was pressed. It reloads b/c I have quite a few calculations that are activated using data that is entered into a form. My reason is that the form is long and I'm trying to prevent the user from scrolling from the top after every reload. At the point of the 'Calculate' button I code:
This code works well in Firefox, but not in IE6,7. My target audience only has IE6, so the fact that if works in Firefox is irrelevent besides the fact that it is driving me crazy wondering why it works in one and not the other.
This problem is more a matter if irritation for me now than having to make it work. I just have to know why! Can someone take a look and see if my php needs to be altered? I even tried to use $_GET from my input:
by putting '&nav=#calc1' but could not get that to work either. Any php person have an idea? Thanks.
I've got a page with 4 'Calculate' buttons derived from a function:
Code:
<?
function calculate($x){
echo "<a href=\"#calc$x\";
echo "<input type=\"submit\" name=\"submit\" value=\"Calculate\"></a>;
}
?>
I'm trying to get the page, upon reloading itself, to go back to the original position of the 'Calculate' button that was pressed. It reloads b/c I have quite a few calculations that are activated using data that is entered into a form. My reason is that the form is long and I'm trying to prevent the user from scrolling from the top after every reload. At the point of the 'Calculate' button I code:
Code:
<a name="calc1"></a><? calculate(1); ?>
..stuff
<a name="calc2"></a><? calculate(2); ?>
This problem is more a matter if irritation for me now than having to make it work. I just have to know why! Can someone take a look and see if my php needs to be altered? I even tried to use $_GET from my input:
Code:
echo "<form method=\"post\" action=\"$SERVER['PHP_SELF']\">";