Jump to content

function problem


Rachel

Recommended Posts

i have a function that im trying to get. it looks like its refreshing rather than sending data to the next page.

im very new to java so dobt no what im looking for. the code looks ok to me.

 

thanks for any help

 

	function change() {
		var selectedList = getSelectedList('Change Layout');
		if (selectedList) {
			if (confirm('Do you want to not display the seat/s ' + selectedList + '?')) {
				document.forms[0].newDisplayCode.value=N;
				document.forms[0].action='layout.php?table=<?php echo $table; ?>&seat=<?php echo $seat; ?>';
				document.forms[0].submit();
			} else {
				clearSelection();
			}
		}
	}

 

php side is

 

<input type='button' value='Change Display' onclick='change()'/>

Link to comment
Share on other sites

ffs. was thinking about the code and i forgot the question.

 

looks like the code is refreshing to itself rather than going to the page required.

all its doing is asking for confirmation (button) then does nothing

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.