php

doctorbill
doctorbill used Ask the Experts™
on
I have attached a fairly simple page which does the following:
Allows a user to select images from a database by ID or by an image selection.

The selected image then appears on the page and details can be added / edited using a form on the lower part5 of the page

When the details have been edited, they are submitted to a database and I have created some sessions whereby variables are passed to the same page in order to keep focus on the the updated image and the page number

It all works well except that I need to add an anchor tag to the end of the GET string after the page has been submitted from the second form. I need to add "#title" after the "submit=submit" text. If I add this manually then the anchor works fine

ie submit=submit#title

Any suggestions greatly appreciated
details-update.php
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
On the URL of the form tag (action property) just add the anchor.

For example, if you have

<form action="mypage.php" .....>

change to:

<form action="mypage.php#title" ...>

Hope it helps.
Most Valuable Expert 2011
Top Expert 2016
Commented:
It appears that you have two submit conditions.   One is onChange, the other is a submit control.  There are a couple of HTML forms in the script.  One is a GET method request for multipart/form-data  I have never seen anything like that before.

I see on line 195 you have this:
<form id="form1" name="form1" method="GET" action="details_update.php#title">

Open in new window

I doubt if that will work, simply because the intent of for submission is to present data to an action script (in this case, GET, the data will be in the URL).  But the action script will not see anything about the #title - that is just a browser directive.

Have you tried isolating the form and making a simple script to see what effect the #title has on the action script/browser combimation?  It might be useful to test that part separately from the rest of this code.  Just a thought... ~Ray

Author

Commented:
You are right. I need to try to find an alternative way of submitting the #title to the page

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial