Custom Refresh Rate To Perl Script

Jun 15, 2009

I am asked to use JavaScript as part of an intro course on Perl in one of the projects.There are two html frames. The lower frame contains two user forms, one for a set of fields (name, email, comments etc), and the other that I am trying to add so that I can set a refresh rate for the upper frame.When I submit the frame rate as a number, say 5, the upper frame reloads but does not refresh at the rate I indicate.

View 6 Replies


ADVERTISEMENT

Get Each Iframe To Refresh At A Different Rate Or Even Combine The Functions Into One?

Feb 4, 2010

The code works, its just making the functions work "per" ad. When it refreshes, it changes "all" ads, I want them to refresh at different RATE

function reloadFrames(first, refresh){delay = 0.2; //minutes to delay the refresh
max_refreshes = 3; if (max_refreshes > refresh){refreshed = refresh + 1;setTimeout("reloadFrames(false, refreshed)", delay*60*1000); if (!first) {ads = document.getElementsByName("ad");for(var i=0; i<ads.length; i++) {ads[i].src = ads[i].src;}}}
}
function reloadFrames2(first, refresh){delay = 1; //minutes to delay the refresh
[Code]....

Is this possible to get each iframe to refresh at a different rate, or even combine the functions into one?

View 8 Replies View Related

Parse Dynamic XML Content Into Html Tables Nicely With 1 Second REFRESH Rate?

Apr 14, 2011

I have been playing with JavaScript few days now. I have a php script that returns data in XML. I want my Dashboard (html) page to show the response back from my php file. Since this is going to be a Dashboard hence it needs to refresh the content every second hence using JavaScript.

I want to get some guides, tutorials, or how-to for this. Any help would be much appreciated.

Here is what I get from my .php file if I do a POST method to it and define variable "extension=9999" to it code...

How can above be nicely presented in an HTML using JavaScript and how would this query be refreshed and re-POSTED every 1 second?

P.S. Amount of XML data coming back to me is dynamic. So, I don't know how much data I get back. Sometime nothing. Sometime 4 childs. Sometime 10 childs in the XML.

View 6 Replies View Related

Rate And Review It Script

Mar 29, 2001

I am looking for a script that would enable users to rate and review products (ie rate it from 1-10 and leave comments about the product). The script must run on a NT server and be free. I know such a script must exist, but I have searched various script archives with no success. I have been considering hacking out my own using a flat file database, but I don't really have the time and don't want to re-invent the wheel.

View 1 Replies View Related

FedEx Or UPS Rate Calculator Integration

Jul 20, 2005

I have to integrate FedEx or UPS's Rate Calculator with an eCommerce web site. I have a web site which offers some products for sale. The price of the products is being charged to customer. But now I want to calculate the amount of shipping depending on the postal code in USA and Canada only with FedEx or UPS and add to the total amount. I looked the tools offered by FedEx and UPS, but still I could not integrate with the web site. Even after following the documentation. I want to do like within one window or an pop-up window of browser, but the goal is depending on the postal
code the amount of shipping should be calculated and added to chargeable amount.

View 2 Replies View Related

Create And Check The Values Of The Product Rate?

Nov 21, 2009

I have checkboxes which are created dynamically depending on the number of records being returned. With each row of the product being displayed along side the check box there is also a value called 'product rate' which is being returned for every product. I have to ensure via javascript that the products which are checked are all of the same 'product rate'. how do i do this? Please help me this is very urgent! I have tried a lot of things but it is not working. I took a hidden value for the product rate which again gets populated everytime the check box is created but i didn';t understand how do i create and check the values of the product rate for the ones which are sele cted?

View 2 Replies View Related

Prompt The User For The Sales Tax Rate As A Percentage

Sep 21, 2009

How can i "prompt the user for the sales tax rate as a percentage"? this is what i have so far....

var tax = prompt("What is your tax rate percentage?", "")
document.write("Return Value: "+tax,("<br />"));

View 2 Replies View Related

Perl Cgi And Javascript Syntax Please

Jul 30, 2009

I just need someone to tell me what the proper syntax is for calling a perl sub from another perl sub.. in trying to use onClick to call a sub in Htmlform() .. but its not working... the cgi works fine.. the mySql parts work fine.. more specificallyprint start_html(-title=>'Lab 6',-scrip=>{-language=>'PerlScript', src=>'mySqlProg.cgi'});i dont know if the above is the corect syntax in relation to thisprint "<button type='button' value='view' onclick='show_entries();'>Show Table Values</button>";

#!/usr/bin/perl
use strict; use warnings;
use CGI qw/:all/;

[code]....

View 4 Replies View Related

Perl Program Problem

Jul 31, 2001

I have a problem with my perl program - it is not able to display the output of vowel count and word repetition count from a text file.
The whole Perl program is supposed to read a paragraph of text and calculate followings based on the text:

1. number of empty spaces.
2. number of words in the text.
3. number of vowels in the text (a,e,i,o,u)
4. number of words with repetition in the text

Example output:-
No. of empty spaces: XX
No. of words : XX
No. of vowels -
a:: XX
e: XX
I: XX
o: XX
u: XX
Words with repetition-
Word 1 : XX
Word 2 : XX
..... ....
..... ....


Here below is the program so far:

View 1 Replies View Related

Mortgage Calc Adding Extra Decimal Place To Interest Rate

Oct 12, 2009

I have a mortgage calc that is adding an extra decimal place to my interest rate. To see this in action go to: [URL]
Change the interest rate to 7.5
Click Calculate Payment
Click Create Amortization Chart
On the following screen you'll see a recap of your data and the interest rate will now say 7.55. Same thing happens if you enter 6.2. Next screen shows 6.22/. I've attached the html and js files in a zip.

View 2 Replies View Related

How To Make A Simple Select Menu That Adds A Flat Rate Shipping Fee?

Oct 18, 2005

Can someone tell me how to make a javascript that will add a shipping price ($5.00) to any price that is listed as a value for a select menu on multiple drop downs?

<select name="shirt">
<option value="10.00">s-l</option>
<option value="12.00">xl-xxl</option>
</select>

Price: <input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$15.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$17.00" /> (would show this if selecting xl-xxl)

<select name="shorts">
<option value="14.00">s-l</option>
<option value="16.00">xxl-xxl</option>
</select>

Price:
<input type="text" name="total" value="$0.00" /> (would show this without touching the drop down)
Price: <input type="text" name="total" value="$19.00" /> (would show this if selecting s-l)
Price: <input type="text" name="total" value="$21.00" /> (would show this if selecting xl-xxl)

View 5 Replies View Related

Calling Perl From Js, Part Deux

Jul 23, 2005

I am using the following method to call a Perl script from js:

<script type="text/javascript" src="http://myserver.com/cgi-bin/x.pl?x=abc"
</script>

The Perl writes an application/x-javascript header followed by some js
code (like document.write).

I can't use the hidden frame method suggested by Erwin Moller because the client page is an eBay ad, and they will not allow any frame code.

Now I want to pass to my Perl script an argument value which cannot be
known until the page is loading (specifically, the page title, which is
created by eBay and contains a unique id). I know how to get the page
title with js, but there's no way (that I can figure out) to dynamically
create the src argument of the <script> tag.

View 1 Replies View Related

New Version Of JavaScript Minifier In Perl

May 29, 2007

I've uploaded a new version of the javascript::Minifier module that
was on CPAN. It was a translation of JSMin but I rewrote it so it now
handles missing semicolons, + ++ code, and leaves those freaky IE
conditional comments in the output. The goal was that if working code
is input then working code is output where working == working.
Breaking code that works is not such a good idea. Code:

View 4 Replies View Related

Return Value To Perl Variable In Cgi File?

Jul 28, 2009

I want to check whether the flash is installed or not on client so i have a javascript function which does this , now i want the resultant variable from this function to return to perl variable in cgi file. i dont want to use form submit because i dont need it. i simply have to take decision for further coding depending on this variable returned from javascript. :cry:the way i m doing is,cgi file,

#!/usr/bin/perl
require './draw_pie.pl';
%lv=("lv1"=>'20',"lv2"=>'10',"lv3"=>'30',"lv4"=>'25',"lv5"=>'10',"lv5"=>'5');

[code]....

View 2 Replies View Related

AJAX :: Passing A Variable From Perl?

Mar 12, 2011

I have a webpage (Perl) that allows a user to select one of two buttons that represent :

<button id = "1" onclick="loadXMLDoc('mysqlinsert.pl')">Choose $name1</button>
<button id = "2" onclick="loadXMLDoc('mysqlinsert.pl')">Choose $name2</button>

Based on the button they choose, I need to pass a variable (declared in Perl) to another Perl page that is responsible for updating/inserting in a MySql Database.

As you can probably tell, I'm new to this. But I'm not sure how the variable ($name1) can be used in Perl to the loadXMLDoc, and then get passed using the 'POST' technique to mysqlinsert.pl??

function loadXMLDoc(url)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari

[Code].....

View 4 Replies View Related

Embed Perl Code Within A Web Page?

Mar 14, 2011

How can I embed Perl code within a web page? I want something like:

Code:
<script language="perl">
perl commands here
</script>

I know how to run Perl CGI routines from an HTML link. That is not what I want.

View 3 Replies View Related

Read JS Data Only File With PERL?

Mar 22, 2011

I have posted a question I believe that relates more to the PERL language, but it has to do with reading an external data only javascript extension file. [URL]

View 2 Replies View Related

Make Perl Code From Forum Post?

Apr 16, 2009

here is my perl code from forum post[URL]

#start for todays date
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
my $day = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",

[code]....

View 2 Replies View Related

Document WriteIn - Reading Perl Cookies

Apr 4, 2009

To read a cookie:
Code:
<script language=javascript>
<!--
var cook=document.cookie.split(";");
var pieces=cook[0].split("=");
document.writeln("Your javascript cookie is called: " + pieces[0] + "<br>");
document.writeln("Its value is: " + pieces[1]);

//-->
</script>

View 1 Replies View Related

Ajax :: Making A Call To A Perl Script

Feb 2, 2011

I am making a call to a perl script using AJAX, this is basically updating a shopping cart item quantity, however; it only works about half the time.. Code:

function UpdateItem(Qty, ProdID, Size){
var XMLHttp;
var ee;
if(navigator.appName == "Microsoft Internet Explorer") {
XMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
} else {
XMLHttp = new XMLHttpRequest();
}
[Code]...

View 2 Replies View Related

Sum Of Array Elements - Add And Delete Dynamic Rows And Auto Calculate The Amount Field By Multiplying Qty And Rate

Mar 21, 2011

This is my code to add and delete dynamic rows and auto calculate the amount field by multiplying qty and rate.

[Code]...

View 3 Replies View Related

JQuery :: Internal Server Error 500 Thrown From Perl Script

Feb 25, 2011

I have a perl script which is called via Ajax. It simply writes 3 values to a database. The code works fine (values get written successfully) but I get an "Internal Server Error" thrown. The Errorlog says "premature end of script headers". There was no problem with the application - it works as required and has for a few months - but I noticed the error via Firebug when testing something else.So I started stripping perl out of the script in an attempt to locate the problem .. and continued till I only had only had two lines left .. the shebang and exit .. I still get the 500 error. Running the script direct from a browser gives the 500 error in the browser window ... from the command prompt it's fine - ie. nothing in the apache errorlog.

There is nothing wrong with the server configuration - it has hundreds of perl scripts and has been running for years.

View 2 Replies View Related

JQuery :: Parse The XML File A Perl Script Sends Back

Jun 10, 2010

Looking to parse the XML file a perl script sends back.I wantto get values from specific tags in the XML file. Here is my code:

[Code]...

The code seems to be getting hung up on the dataType: "xml", line because when I comment it out, it goes to the next step and executes the function (although it doesn't do anything). how I can change this or just take a different approach? Let me know if I can provide more information.

View 2 Replies View Related

Refresh Parent From IFrame Makes Refresh Loop In FF Only?

Jan 2, 2009

I have this code in a page that appears in my iframe if requested from parent:

<script type="text/javascript">
parent.rrr();
</script>
The parent code is:
function rrr() {
javascript:location.reload(true);
}

So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.

Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.

Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.

View 2 Replies View Related

Diving Into Regexp By Porting A Perl Script Over To Js That Uses Regexp To Compress Into A Bookmarklet Capable Format?

Aug 10, 2010

I'm finally diving into regexp by porting a perl script over to js that uses regexp to compress javascript into a bookmarklet capable format.I've successfully worked out 90% of the expressions but am troubled with a few, this one at the moment is odd:I want to remove the first line if it hasjavascript:So I thought str.replace(/^javascripts+:s+/, "") would be ok. I want javascript text, any space, colon, any space and new line. what I'm doing wrong.btw this is the original perl version

$src =~ s{^// ?javascript.+:.+
}{};

View 3 Replies View Related

JQuery :: Refresh DIV With Full Page Refresh?

Aug 11, 2009

How to refresh DIV , without refresh entire page,Am having four DIV ,

DIV1,DIV2,DIV3,DIV4

I want to refresh only DIV! without affecting the DIV3,DIV4 ,

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved