Click to See Complete Forum and Search --> : post via link


tripwater
06-03-2003, 03:59 PM
I have a page that is made up of links that are from a DB query. When you click on a link it takes you to the next page giving you more info on that link.


My problem is on the first page (one with the links) I have one checkbox to allow the user to view all or just incomplete items. So if the user checks the box to view all tasks then clicks on the task choice link I need that link to post the checkbox value(checked,unchecked) to the next page.

The only way I know to do this in the past is via submit button. But I need for all of my links to post so I can check on the next page and base my query accordingly. I have a form tag around my code with method=post.

also I am using php and need to access the page I am going to via <a href=../main/mypage?id=taskid>click me</a> so I can't just use the action = in the form tag.


Is this possible?

Thank you for any help.

tripwater
06-03-2003, 04:41 PM
I decided to use a droplist and pass over the info via the value instead of using links.

this should take care of my issue. Thanks for looking.

Khalid Ali
06-03-2003, 04:41 PM
you don't need to submit the form for this purpose,just add the checkbox status at the end of the url

e.g

<a href="../main/mypage?id=taskid&isChecked=false">click me</a>

tripwater
06-04-2003, 08:53 AM
Thanks for the reply.

So what you are saying is I can post the contents(value) of a field via link?

WIll this work for a popup? For example say I have a form that has a droplist of developers and a date range. Can I click a link (after selecting a developer and a date) that brings up a popup and passes the choices to that popup so I can then query for all of that developer's tasks within that date so The admin would not have to leave the parent page.

This solution if I understand you correctly will answer many questions for me. Because another issue I have is the admin wants to be able to view all tasks assigned to a developer within a date so he does not resubmit the same task by mistake. It would be helpful to not have to leave the parent form.

So I guess my question now is am I correct in the above? How would I do this?

parent page:


<script>
var picwindow;

function openwin(url)
{
picwindow = window.open(url,\"task1\",
\"height=100, width=350, toolbar=no, menubar=no, resizable=yes, scrollbars=yes, left=0, top=100, screenX=0, screenY=100\");

picwindow.focus();

return false;

}

</script>

***********Just a partial section of my form**********

<form name=tasks>
<select name=developers>
<option value=1>John Doe
</select>


<select name=month>
<option value=01>01
</select>

<select name=day>
<option value=01>01
</select>

<select name=year>
<option value=2003>2003
</select>

<a href=\"\" onclick = \"return openwin('../view/devtasks.php?id=>View Developers Tasks</a>

</form>

Khalid Ali
06-04-2003, 09:01 AM
Yes you should be able to pass data using url with no problem..just append the identifier and the values at the end of url using "?" mark and then using "&" to add multiple identifiers.

On the other hand if its the popups you are concerned you can pass a great deal of data using the following methods..Check the link below.
http://68.145.35.86/skills/javascripts/ParentWinInteractionWithChildWin.html

tripwater
06-04-2003, 09:05 AM
thanks I will check it out