Jump to content

Javascript Navigation


Recommended Posts

I am using the following code to redirect to the same page with the following variables for further processing, but it will not redirect.

function remove_card($id){		window.location = "?f=remove_record`" . $id;	}

It seems that it is trying to go to a file just named that when I need it to go to the current file while adding to the end of it.for instance say the current page is info.phpit would need to redirect to info.php?f=remove_record`IDNUMBERThanks for any help.

Link to comment
Share on other sites

not sure what you mean.Also if I am using php to query a mysql database, I want to make the edit option a js popup box. I have the box but I am having trouble making it edit the correct record. Any suggestions?I have this so far

<img src="Check Mark.gif" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'screen-center',		 0,   0);" />

The record would come from $array['id'].this is the popupbox code itself

<link rel="stylesheet" type="text/css" href="sample.css" /><script type="text/javascript" src="popup-window.js"></script><div class="sample_popup" id="popup" style="display: none;">	<div class="menu_form_header" id="popup_drag">		<img class="menu_form_exit"   id="popup_exit" src="form_exit.png" alt="" />		   Edit Record	</div>	<div class="menu_form_body">	<?php $msg = 'edit_record`' . $_COOKIE['record'];?>	<form action="" method="get">	<input id="record_delete_id" name="f" type="hidden" value="" />		<table>			  <tr>				  <th>					  name:				  </th>				  <td>					  <input class="field" type="text" onfocus="select();" name="new_name" />				  </td>			  </tr>			  <tr>				  <th>					  series_number:				  </th>				  <td>					  <input class="field" type="text" onfocus="select();" name="new_series_number" />				  </td>			  </tr>			<tr>				  <th>					  series_name:				  </th>				  <td>					  <input class="field" type="text" onfocus="select();" name="new_series_name" />				  </td>			  </tr>			  <tr>				  <th>							   				  </th>				  <td>					  <input class="btn"   type="submit"   value="Submit" />				  </td>			  </tr>		</table>	</form></div></div>

Line 11: is the line that would need the id from the row. That will return the correct string for proccessing the change. I tried to use cookies, but it would only change the last one no matter what one you choose.Got the popup from http://www.php-development.ru/javascripts/popup-window.php

Edited by dzhax
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...