Input / submit button not working

HI guys,

Can anyone possibly expain why the following button is just sitting there and wont goto the url?


<form action=\\"http://www.google.com/index.php\\" method=\\"get\\"
target=\\"_self\\"><input type=\\"submit\\" value=\\"Continue Shopping\\"></form>

It does however work if I leave this existing code in; you can then click the bottom button to get to the url:


 <form action='http://www.google.com/index.php' method='post' id='continueshopping'>
			<input type='submit' VALUE='Continue Shopping'>
			
			</form>
			
			<form action=\\"http://www.google.com/index.php\\" method=\\"get\\"
target=\\"_self\\"><input type=\\"submit\\" value=\\"Continue Shopping\\"></form>


Why are the quotes escaped? (\") You should not escape those quotes.

Also, the first quote for the ‘action’ attribute of the form tag is not escaped, so that could be part of the problem.

thanks for the reply.
I am escaping the quotes because the code is within a php script.

I fixed the action attribute like you suggested but it still wont do anything??


 <form action=\\"http://www.google.com/index.php\\" method=\\"get\\" target=\\"_self\\">
                   	<input type=\\"submit\\" value=\\"Continue Shopping\\">
                   </form> 

Thanks, I Got it sorted using:


   <FORM>
<INPUT TYPE='BUTTON' VALUE='Continue Shopping' ONCLICK=\\"window.location.href='http://www.domain.com/store/'\\">
</FORM>

Also, you are missing the closing of the input tag:

<input … />

Maybe it’s that? What’s the output you see on the browser (view source code)

You haven’t fixed the action attribute… you’re still escaping every double quote after the first one. What’s the PHP line you’re using to output that form tag?

Your ‘sorted’ method is still escaping what it shouldn’t…

OK…now I am really stumped LOL
The update button below works in Firefox but in IE the button wont press???


<td width=\\"33&#37;\\" align=\\"center\\" scope=\\"col\\" valign=\\"center\\">

	<form name=\\"continue\\">
		<input type=\\"button\\" value=\\"Continue Shopping\\" onclick=\\"window.location.href='http://www.aaaaa.com.au/store/'\\" />
	</form>

</td>
                   
<td width=\\"33%\\" align=\\"center\\" scope=\\"col\\" valign=\\"center\\">
	<input type=\\"submit\\" value=\\"Update Cart\\" /></form>
  </td>

If I remove the first td cell and contents the update cart button works in both IE and firefox.

Can anyone possibly assist?


$output[] = "form code here";
$output[] = "form code here";

return join('',$output);


http://www.w3.org/TR/html401/interact/forms.html

What if he is using html 4.01?

I am using XHTML 1.0 Strict

OK. Look at the code. The syntax colouring straight away should tell you there’s a problem - you’re opening the first string for the table cell with a double quote, but escaping all the closing double quotes (\" instead of "), so that it never actually gets closed. I’m surprised it works anywhere.

And thank you for not posting the actual code like I asked -_-

What’s the actual output? from the view page source in the browser?

Instead of using double quotes and escaping them wiith the backslash, just use single quotes…