top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can convert this code by using forms not prompt !

0 votes
350 views

<?xml version="1.0" encoding="utf-8" ?>
Assignment 2

var count;
// the number of value that you want to check if number or no
count=window.prompt("please enter value for count ");
var c;
c=parseInt(count);
if(!isNaN(c))
window.alert("The Value Is Number ! ");
else
{
window.alert("SorrY . The Value is Not Number (NaN ) ");
c=window.prompt(" NOT NUMBER ! \n please enter value for count ");
}
while(c<0)
{
c=window.prompt(" NEGATIVE NUMBER ! \n please enter value for count ");
if(!isNaN(c))
window.alert("The Value Is Number ! ");
else
{
window.alert("SorrY . The Value is Not Number (NaN ) ");
c=window.prompt(" NOT NUMBER ! \n please enter value for count ");
window.alert(" POSITIVE NUMBER ");
}}
document.writeln("GooD . The Value is Positive ");

posted Jul 8, 2014 by As M Ob

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I want the javascript API which could capture the screen of the client. Does anyone knows about it?

+2 votes

My project's UI using both HTML and applet.
when the javascript function "saveSessionAs()" that has the following statement, getting called from the HTML the popup window flickers.

value = window.showModalDialog(ContextPath  + "/jsp/choosepath_frames.jsp", args, "dialogHeight:"+dlg_height+"px;dialogWidth:550px;help:no;scroll:no;status:no");

while the same function called from the applet using the statement

ReportApplet.getJSObject().call("saveSessionAs");

Then its working fine. It does not flicker.

So my doubt is, why the same function's behaviour is different??
And how that can we fixed??

–2 votes

(a) Write a Java program the decomposes a well-formed URL input into its components: scheme (protocol),
hostname, port number, and the resource (le).

(b) Reconstruct the decomposed URL in part (a) into its equivalent one, but replace the hostname with its IP
address.
Tip: Have a closer look at the java.net.URL API and the IdentifyHostIP.java.txt from

...