Gossamer Forum
Home : General : Perl Programming :

Too Dumb (Simple Question Here)

Quote Reply
Too Dumb (Simple Question Here)
Okay, I don't know ANYTHING!

I can stumble my way through setting CONFIG files on scripts
but I really don't know what I'm doing. So here is my dumb
newbie question.

I have a shopping cart program with a variable

Code:
$FinalAmount


earlier in the script it has this line:

Code:
my ($FinalAmount) = CommifyMoney ($frm{'Final_Amount'});



So, which of these snippets of code is right?

Code:
<!-- Google Conversion Code -->
<script language="JavaScript">
<!--
google_conversion_id = 5555555555;
google_conversion_language = "en_US";
if ($FinalAmount) {
google_conversion_value = $FinalAmount;
}
google_conversion_label = "Purchase";
-->
</script>
<script language="JavaScript" src="
http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<a href="
http://services.google.com/sitestats/en_US.html" target=_blank>
<img src="
http://www.googleadservices.com/pagead/conversion/5555555555/?value=$FinalAmount&label=Purchase&hl=en">
</a>
</noscript>








----- or -----



Code:


<!-- Google Conversion Code -->
<script language="JavaScript">
<!--
google_conversion_id = 5555555555;
google_conversion_language = "en_US";
if (Final_Amount) {
google_conversion_value = Final_Amount;
}
google_conversion_label = "Purchase";
-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<a href="http://services.google.com/sitestats/en_US.html" target=_blank>
<img src="http://www.googleadservices.com/pagead/conversion/5555555555/?value=Final_Amount&label=Purchase&hl=en">
</a>
</noscript>







The shopping cart script has a template that uses this:

Code:
<!--MOF V1.5 INPUT AREA-->


to call the specific script info from the CGI-Bin.



I am too dumb to even know if I have asked the question
right. If you need more info I'll be glad to try to figure
out what you ask for.


Thanks for saving me (again!!!)


--Curt
Quote Reply
Re: [Curt] Too Dumb (Simple Question Here) In reply to
Basically my question is:

Should I use:

Code:
$FinalAmount


Or



Code:
Final_Amount




...if I want to pass the variable to another script from a page that is dynamically generated.



--Curt
Quote Reply
Re: [Curt] Too Dumb (Simple Question Here) In reply to
This is javascript code not perl and the first snip of code is correct.
$frm{'Final_Amount'} refers to a hash value.

Bob
http://totallyfreeads.com.au