|
| |
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
Hidden form field to update record *solved* - 10/26/2005 13:26:37
I need the proper string for a hidden form element. This is what I am using now: <input type=hidden name=blogid value=<%("BlogID")%>> I have a table using a primary key field name BlogID, that I need to pass through a form as a hidden form field to identify an update to the record. For more info regarding my overall issue this is the oher info I have already posted http://www.frontpagewebmaster.com/m-295274/tm.htm Thanks in Advance!
< Message edited by lovduv -- 10/27/2005 10:50:21 >
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Hidden form field to update record - 10/26/2005 13:27:31
quote:
<input type=hidden name=blogid value=<%("BlogID")%>> change <% to <%=
_____________________________
Dan
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Hidden form field to update record - 10/26/2005 13:41:54
Before you post the form, view the source of the page to see if you are indeed picking up a BlogID.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/26/2005 20:00:32
Hmmm.. the BlogId is indeed not there, but the info from blog post is there? here is the source: <td valign="top"> <form method="POST" action="update_blog.asp"> <p> </p> <p><textarea rows="13" name="BlogPost" cols="77">Test, you guessed it #4</textarea></p> <input type=hidden name=blogid value=BlogID> <p><input type="submit" value="Submit" name="B1"></p> </form>
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/26/2005 20:10:41
<td valign="top"> <form method="POST" action="update_blog.asp"> <p> </p> <p><textarea rows="13" name="BlogPost"cols="77"><%=request ("BlogPost")></textarea></p> <input type=hidden name=blogid value=<%=("BlogID")%>> <p><input type="submit" value="Submit" name="B1"></p> </form> <p> </td> When I look at the 2 asp source and live source, there is no request for BlogID is that the problem?
< Message edited by lovduv -- 10/26/2005 20:26:49 >
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/26/2005 20:45:19
<p><textarea rows="13" name="BlogPost"cols="77"><%=request ("BlogPost")></textarea></p> This records info is pulled by a hyerlink in a DRW on the previous page, and it works it pulls the info, from whatever records hyperlink I click. How do I pull the BlogID and pass it to the form? For BlogPost I used the parameters: <%=FP_FieldURL(fp_rs,"BlogPost")%> What would I use for BlogID? lovduv
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Hidden form field to update record - 10/26/2005 22:35:19
quote:
Type mismatch: 'FP_FieldURL' Looks like you may have put a DRW-only variable outside a DRW. Make sure they are in between the two fp include lines. If you need to use a DRW value outside a DRW, you'll need to define it and assign it the value. <%DIM myVariable%> .... .... <!--#include file="_fpclass/fpdbrgn1.inc"--> <%myVariable = FP_Field(fp_rs,"myDBField")%> <!--#include file="_fpclass/fpdbrgn2.inc"--> .... Then you can use it like so: <%=myVariable%> That make any sense? Does it apply here?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/26/2005 22:56:53
I think it's between the includes? This is the DRW, I hyperlink from: fp_sQry="SELECT * FROM Blog ORDER BY DateAdded DESC" fp_sDefault="" fp_sNoRecords="<tr><td colspan=3 align=""LEFT"" width=""100%"">No records returned.</td></tr>" fp_sDataConn="Database1" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=5 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&BlogID=3&UserID=3&UserName=202&BlogDateYear=3&BlogDateDay=3&BlogDateMonth=202&DateAdded=135&RemoteAddress=202&BlogPost=203&" fp_iDisplayCols=3 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %> <!--#include file="_fpclass/fpdbrgn1.inc"--> <!--webbot bot="DatabaseRegionStart" endspan i-checksum="27089" --><tr> <td> <a href="update.asp?BlogPost=<%=FP_FieldURL(fp_rs,"BlogPost")%>&BlogID=<%=FP_FieldURL(fp_rs,"BlogID")%>"> <!--webbot bot="DatabaseResultColumn" s-columnnames="BlogID,UserID,UserName,BlogDateYear,BlogDateDay,BlogDateMonth,DateAdded,RemoteAddress,BlogPost" s-column="BlogID" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>BlogID<font size="-1">>></font>" startspan s-ColumnTypes="3,3,202,3,3,202,135,202,203" --><%=FP_FieldVal(fp_rs,"BlogID")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="14502" --></a></td> <td> <!--webbot bot="DatabaseResultColumn" s-columnnames="BlogID,UserID,UserName,DateAdded,RemoteAddress,BlogPost" s-column="DateAdded" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>DateAdded<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"DateAdded")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="17234" --></td> <td> <!--webbot bot="DatabaseResultColumn" s-columnnames="BlogID,UserID,UserName,DateAdded,RemoteAddress,BlogPost" s-column="BlogPost" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>BlogPost<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"BlogPost")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15851" --></td> </tr> <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR><BR></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--> <!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></tbody>
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/27/2005 0:06:48
Man, I need to take a class or something. The live source code of the form is still not passing on the BlogID Ok to recap: edit.asp has a DRW with the BlogId as the link to update.asp which has a form with only one text area, populated with the info from DRW on edit.asp this form submits to a DRW on update_blog.asp I use parameters in the BlogID hyperlink to populate the form on update.asp, the parameter I use is: <%=FP_FieldURL(fp_rs,"BlogPost")%> for BlogPost..and <%=FP_FieldURL(fp_rs,"BlogID")%> for BlogId The BlogPost parameter is working, but BlogID is not This is where I have the records DRW http://www.missyandross.com/editblog.asp This is where you edit the record with the form http://www.missyandross.com/update.asp?BlogPost=Test%2C+you+guessed+it+%234 This is where I have the DRW to process the update http://www.missyandross.com/update_blog.asp Please take a look!
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Hidden form field to update record - 10/27/2005 2:12:30
If I remove this parameter in the hyperlink, then the forms text area is blank. <%=FP_FieldURL(fp_rs,"BlogPost")%> for BlogPost Should I change the initial value of the text area to something like this: <textarea rows="13" name="BlogPost" cols="77">=BlogPost value="<%=request.querystring("BlogPost")%>"> Also on this page http://www.missyandross.com/editblog.asp I changed it to have an update link and delete link Update is working, but how would I make it delete the record?
< Message edited by lovduv -- 10/27/2005 5:10:52 >
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|