hi!
i am totally new in perl and i have a problem..i have a search maschine and after every query i call a perl script to do the jod and see the results. i want every time i run the perlscrit to be able to see a progress bar in my web interface. i want to know how can i call a javascript (i have a js progress bar ) from my perl script..??

Hi,
Look at this example here. you can call very simple as standard html Code.

#!/perl/bin/perl -w

my $random_number = int( rand( 10));

print <<HTML;
Content-type: text/html;

<html>
<head>
<title>A Random Number</title>

<script>
var myNumber = $random_number;

function display() {
alert( "Your random number is "+ myNumber);
}
</script>

<style>
.display { padding: 50px; text-align: center; background: lightblue; }
</style>

</head>

<body>
<div class='display' onMouseOver='display();'>HOVER HERE TO SEE THE NUMBER!</div>
</body>

</html>
HTML

Thanks,
Senthil. V

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.