Gossamer Forum
Home : Products : DBMan : Customization :

Getting A Value

Quote Reply
Getting A Value
Ok - maybe my first attempt wasn't clear.

How can I get one value from html.pl and use it in another subroutine in the same html.pl file

Need $rec{'URL'} in another subroutine - call it HTML_Middle_Frame

Many thanks
Quote Reply
Re: [gatman] Getting A Value In reply to
Haven't personally had any experience using dbman in frames, but try the following and see if it helps any: use $in{'URL'} instead of $rec.

Also, we use javascript to open pop up windows (using the info in dbman) and pass information in the following manner.

<script>document.write(window.opener.form.URL.value)</script>

and you can even do nifty stuff such as:

<script>if (window.opener.form.URL.value == "www.aol.com") {document.write('Contact America Online')};</script>

Pay close attention to the subroutines such as view_search, and view_success. You should be able to copy one of those and rename it what ever you want. You'd then "call" it by using
Code:
|; &html_middle_frame; print qq|
(if placing it in the middle of stuff being printed)
Quote Reply
Re: [Watts] Getting A Value In reply to
Thanks - Yes I tried these, but no luck.

I have addressed the frames issue by having setup frame frames in db.cgi

elsif ($in{'frame'}) { if ($per_view) { &html_frame; }
else { &html_unauth; } }

I am executing the frame with a link in html.pl

print qq|<a href=\"$db_script_link_url&$db_key=$rec{$db_key}&frame=1\">More Info</a>

and I want &html_frame subroutine to execute like:

<frameset rows="90,*,50">
<frame name="header" src="$db_script_link_url&top=1">
<frame name="main" src="$rec{'URL'}"> - NEED PATH TO $rec{'URL'}
<frame name="footer" src="$db_script_link_url&footer=1">
</frameset>

I just can't seem to get that $rec{'URL'} value passed.



Open Window not acceptable because of design needs.

Have used php form function to pass value - this works. EXCEPT it screws with the List All (Modify/Delete) because it's a form in a form. We are living with it since we don't need it, but it's really not a good solution.

See it in action:

Marine Industries Charter Database