Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you send an email with a link that contains....

Status
Not open for further replies.

webdevelopernj

Programmer
Jul 1, 2002
9
US
How do you send an email with a link to a frameset page that contains attributes such as "onClick".

My problem is that currently I send an email with specific cgi parameters. Although, this does display the page i want, i do not have the entire frameset, just that page.

Currently, I concatenate a string and the link is constructed:

$msg = $msg . "To approve this MR point your web browser at URL: \n tracking/approve/approveLTR.cgi?keysearch=$fw_key\n\n";

However I need to do this:

<a href=&quot;tracking/approve/index.html&quot; onClick='parent.main.location.href=&quot;approveLTR.cgi?keysearch=$fw_key&quot;'>Open LTR $fw_key</a>

Can you help?

Note:
$msg = $msg . &quot;To approve this MR point your web browser at URL: \n racking/\n\n&quot;;
 
You cannot do what you are asking for. You can't include an &quot;onClick&quot; as part of a URL--that is JavaScript running on the client that has the context of the already loaded frameset.

What you need to do is email a link to the frameset--then include in the query string (after the '?') some variable that indicates the frame page to load for the interior frame. The Perl script that is generating the <FRAMESET> code can be dynamic so it outputs <FRAME SRC=&quot;$frameSrc&quot;> where $frameSrc is based on the existence of the variable described above.

URL Example for Email:

I hope this helps.

-Aaron Simmons
asimmons@mitre.org
 
Thank you Aaron, I'm still working on it. I created a redirect page for my index.html to be a cgi script. This way it can handle variables.

I've created the paramerter: $query->hidden(-name=>'frameSrc' -default=>'home.html')

where $pageVar = $query->param('frameSrc');

if ($query->param('frameSrc') ne 'home.html') {
$pageVar = $query->param('frameSrc');
}

&print_frame();

sub print_frame {

print<<=EOF;
....
<frame src=$pageVar name=main>
....
EOF
;
}
this works when I click the email link for the frame. however, the one problem i'm having is that when the page is brought normally from the browser the frame display however, the &quot;main&quot; window reports an error saying &quot;file not found&quot;

I'm not sure if I described this issue well enough, but let me know if you can reproduce this type of code. I've implemented your concept and it makes sense, I'm just having some trouble with perl.
 
I'm not 100% sure what you mean when you say &quot;when the page is brought normally from the browser...&quot;

Does the home.html file exist? Is that the page it is pointing to and failing?

If you're using IE, go to View | Source -- this will show you the HTML for the FRAMESET code (assuming you're looking at a frame). What does the SRC attribute say for the frame that is not coming up? Does that path look accurate?

I'm not sure exactly what to do next...let me know what turns up from the steps above.

-Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top