plukkie — 2011-10-30T13:06:46-04:00 — #1
self.location='index.php?cat=' + val ;}
My PHP controller (index.php) code to load the correct frames is as follows:
<li><a href="index.php?id=add">Add new product</a></li>
break; case "home": include('home.html.php');
break; case "overview": include('add.html.php');
break; case "add": include('add.html.php');
self.location='index.php?id=toevoegen?cat=' + val ;}
so that the PHP index script loads the add.html.php automatically. However, when changing the self.location as described above the page is redirected to home.html.php.
scallioxtx — 2011-10-30T14:59:15-04:00 — #2
You can't use ? twice in the URL. If you want to pass multiple variables you need to use ampersands, like so
[B]<font color='"#0000FF"'>?</font>[/B]variable1=value1[B]<font color='"#0000FF"'>&</font>[/B]variable2=value2[B]<font color='"#0000FF"'>&</font>[/B]variable3=value3...
so in your case that would be
self.location='index.php<font color='"#0000FF"'>[B]?[/B]</font>id=toevoegen[B]<font color='"#0000FF"'>&</font>[/B]cat=' + val;
Also note that that link contains "id=toevoegen" as opposed to "id=add" which it looks like you were going for
if any non-dutch people are reading in here, "toevoegen" in Dutch means "add" (loosely translated).
plukkie — 2011-10-30T17:10:32-04:00 — #3
I see you are also dutch I changed all the names to English for this thread but forgot to translate "toevoegen".
Anyway, I tried your advice and it's working exactly as I wanted to. In the end it is such a simple solution, but if you don't know you can keep looking in the wrong direction. Thanks a lot for your help!!!!
scallioxtx — 2011-10-30T17:12:22-04:00 — #4
Good to hear! And if you ever need more help, we'll be here