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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a variable in a tk MsgBox ?

Status
Not open for further replies.

rab54

Programmer
Jan 28, 2004
112
GB
OK gurus -

Is it possible to display a variable in a MessageBox ,using perl/tk ?

cheers for any help

Rab
 
What kind of message box are you talking about?
Like a javascript alert box?

Just do this in your perl script:

Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";

my $var = "This is my alert";

print <<this
<html>
<head>
<script type="text/javascript" language="JavaScript">
function varalert()
	{
	alert("$var"); 
	}
</script>
</head>
<body>
<form name="trafficcomplaint" onSubmit="return varalert()">
<input type="submit" value="Alert Me">
</form>
</body>
</html>
this
 
No - I am using tk -

I need to display a Message Box like this -

my $response = $mw->messageBox(
-icon => 'info',
-message => '$deleted_recs_count duplicate records ...',
-title => 'Info',
-type => 'Ok',
);

But the $deleted_recs_count variable is not showing the exact count just the variable name .....

cheers
 
OK Solved it !

I just needed to put ""'s round it not ''s ... doh !!

cheers anyway guys


Rab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top