Need help in Java Script
i Need some help in Java Script,
am using the following code :
<script type="text/javascript">
var newwindow;
function poptastic(url)
newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
if (window.focus) {newwindow.focus()}
else {newwindow.close()}
// if (window.focus) {newwindow.focus()}
</script>
In HTML,
thWorld Environment
Day, June 5<sup>th</sup>,2005
Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
but according to the above code, the new window is opened but have to close it manually....
Is there any other way to close the popup when my mouse is out of the link
Prawn,
This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
Please kindly take your question to an appropriate JavaScript forum.
Have a happy day.
Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201
Similar Messages
-
Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form
I have a form (test) that I am creating in Adobe Acrobat Pro 9.
I need help creating custom Java Script so I can get the desired answer.
1) There are several questions in each group that require a numerical answer between 0-4
2) There is a total field set up to sum the answers from all above questions
3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
Any help on what Java Script I need to complete this would be greatly appreciated!
I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
Thanks in advance.Have you tried the "The field is the average of:"?
-
Need help with Java script calling an html page
Hello -
I have a bunch of web pages, that call a java script called "header.js". The "header.js" puts a header on the top of each web page. In the Java script, I have a gif (picture) that displays a logo and if you click on it, it will send to you a different website.
I'd like to replace this gif with an actual web page. So, the "header" would actually be a web page and not some gif.
Below is a snippet of the code and I'd like to replace the highlighted section with a web page called "header.html". I don't even know if this is possible.
Can anyone tell me what I need to do? I know pretty much nothing about Javascripting so please be as detailed as you can. Thanks!
/* Common header across all pages... */
document.write(' <div id="header" class="clearfix">');
document.write(' <div id="left" class="float_left">');
document.write(' <div id="logo"><a href="http://www.xyz.com/" onclick="window.open(this.href);return false;" onkeypress="window.open(this.href);return false;" target=_blank><img src="/images/xyz.gif" width="105" height="75" alt="" border="0" /></a></div>');
document.write(' <div id="mainNav" class="clearfix"> ');
document.write(' <ul>');
//document.write(' <li id="nav_controls"><a href="controls.html">Controls</a></li>');
document.write(' <li id="nav_motion"><a href="motion.html">Motion</a></li>');
document.write(' <li id="nav_sensor"><a href="sensor.html">Sensor</a></li>');
document.write(' <li id="nav_encoder"><a href="encoder.html">Encoder</a></li>');
document.write(' <li id="nav_system"><a href="system.html">System</a></li>');
//document.write('<!-- <li id="nav_logs"><a href="#">Logs</a></li> -->');
document.write(' </ul>');
document.write(' </div>');
document.write(' </div>');
document.write(' <div id="right" class="float_left">');
document.write(' <div id="controls">');Well, the problem with this is that I'm not an expert on SSI and I really know nothing about javascripting...so I'm afraid of breaking the whole web site and also having to modify all the web pages that call this header.
I'll have to read up on server side include...cause I don't know much about it.
If I could do what I want with this "header.js", it would be a lot easier. -
Needed help on java script and html in PL/SQL doing nothing
Hi,
Created a procedure which takes username and password and changes OID, database password for that user with that password.
I created a page in oracle portal and trying to call this below script package:
BEGIN
user_name := portal.wwctx_api.get_user;
HTP.p
<!-- BEGIN CODE FRAGMENT -->
<script language="javascript">
<!--
function ValidatePass()
var passStr = document.getElementByid("p_password").value;
var confPassStr = document.getElementByid("Confirm_Password").value;
var pattern = /[^a-zA-Z0-9]/;
if (passStr == null || passStr == "") {
alert("Password value missing");
return;
if (confPassStr == null || confPassStr == "") {
alert("Confirm password value missing");
return;
if (passStr.match(pattern) == null && confPassStr.match(pattern) == null) {
if (passStr == confPassStr) {
document.form.submit();
} else {
alert("Your entries did not match. Please try again!");
} else {
alert("Invalid charcters entered");
//-->
</script>
<form name="changepassword"
action="http://<hostname>:7777/pls/sys/sys.gx_user_mgt.globally_update_password"
method="post" AutoComplete="Off">
<input type="hidden" name="username" value=" '
|| user_name
|| ' " id="p_username"/>
New Password:
<input type="password" name="p_password" id="p_password">
<br>
<br>
Confirm Password:
<input type="password" name="Confirm_Password" id="Confirm_Password">
<br>
<br>
<input style="padding:2px;" type="submit" value=Login onClick="ValidatePass();">
</form>
END;
This gx_user_mgt.globally_update_password is the custom procedure I should call passing username and p_password
Thanks in advance.Friends I want to try something but I am totally lost on how to achieve it.Just to let u know that I have not worked in JAVASCRPT at all.And I am in great hurry to finish this work.
What I am looking for is :
1) a JSP page is thrown
2) a button is clicked
3)Moment the button is clicked I want a file to be created with an extension HTML (having all the info from the database) by using FileWriter class .After the file is created and ready ,Then I want to open this file in another browser window.
I know that to achieve this I have to use Javascript,but I am totally lost on how to do that.
I mean can I say in JAVASCRIPT that if this button is clicked then execute a java method which retrives data from the oracle database in the server and writes it to a HTML file and then after the writing is done,open it another window.
Please help. -
I need help adding Java Script to a BC form?
I have a form in drop down that I built in BC than took the HTML code to Dreamweaver in order to place the form in to a two column table. I was told by the BC support that a JS that required the fields to filled in is required. Not sure how to do that, please help.
That is what I thought. But i figured out what I did wrong. I used a custom field for First and Last Name rather than the BC Field. Once that was replaced it worked great. Thanks Liam.
-
I need help writing a script that finds the first instance of a paragraph style and then changes it
I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style. I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style. Any help would be greatly appreciated, thanks!
Hi,
Do you mean first instance of the paragraph style
- in a chosen story;
- on some chosen page in every text frames, looking from its top to the bottom;
- in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
If story...
You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
so:
Story.findText()[0].appliedParagraphStyle = Style_1;
//==> this will change a paraStyle of 1st occurence of story to "Style_1".
If other cases...
You would need to be more accurate.
rgds -
I am trying to convert my prcess from DTS to SSIS. I am running this report out of SAP and then using Monarch to put into the correct form, then I am using the DTS to put it into the database on the SQL server. I am able to get all the other info to
move out having so much trouble here to get the plant number. The issuse is that it is on top on the page and it will change when a new plant is needed.
Thanks for any help
I need help wrting a script that will put that 7010 into a cloumn nnamed plant number.To convert from DTS packages to SSIS you can just open the DTS package in a new SSIS project (depends on target SSIS version by using SSDT or BIDS).
The rest is mechanics how the iteration with SAP is done and may be beyond the scope of this forum.
Arthur
MyBlog
Twitter -
ok so i have a midterm and need help this question that is gonna be on the midterm. i dont know how to do it and its worth 16 marks!!!! here it is
the UW Orchestra wants to produce a CD containing all the pieces of music
from its upcoming concert. In order to do that, it needs to calculate the total length of time for the
CD. In addition, the conductor wishes to know which piece of music has the longest duration.
Sample output for the program.
The Swan (3.88)
The Bee (0.98)
Claire de Lune (6.02)
Liebesfreund (3.38)
Ragtime (3.48)
The total time for the CD is 18.74 minutes.
The longest piece is Claire de Lune.
Do not include the HTML that is required to embed the program into a Web page (that is, show
only what you would write between <script> and </script> tags).
[4 marks] In the following space, define a function, Print, that takes two parameters, Title and
Length, and outputs a line of text such that Title appears in italics, followed by Length in
parentheses. The function also returns the value of Length.
For example, Print("My World",30) will output the line
My World (30)
and return the value 30.
Put your JavaScript program for the remainder of this question in the space provided on the next
two pages.
[9 marks]. For each piece of music, your program should input the title of the piece and the
duration (in minutes) for that piece, and it should output a line showing those values using the
Print function just defined. After all pieces have been listed, the program should output the
total length of time for the CD, adding in 0.25 minutes between each piece of music (which is
needed on the CD to separate the pieces).
[3 marks] The program should also output the name of the piece that has the longest playing
time.
Use reasonable variable names, indentation and good programming style. Documentation and
comments are not required, but you may add them to explain any assumptions you might want to
make. You need not check that the input is valid, and you may assume that no two pieces have the
same duration.
can anyone help me out! i would be indebt of ur kindness if u can help me out!This forum is for Java, not JavaScript. The two have nothing to do with each other.
And anyway, this is your studying, so you should try to do it, put forth your best effort, and ask specific questions (on the proper fourm). -
Sreaming at the top of my lungs for HELP with Java Script problem!
Hello,
I have this strange problem that no one seems to know why or how to fix it.Whenever I encounter a web site that has java scripting for anything pop ups or redirects to url's anything that says java script when I mouse over the link my browsers do nothing.That is for explorer 6.0 beta netscape 4.7 and netscape version 6.I have tried in another forum some suggestions but nothing changed even though I am told nothing is wrong with the java scripting.I used to be able to click java script's with all of these browsers but no longer.That was a few months ago.Now to try something new I tried to see if a new browser would work.I now have the latest version of Opera.It did work but using Opera on some sites limits what I can do so it doesn't solve my problem.Then I tried the Sun JavaHot browser it also worked but limits what I can do on some site's.I have Windows 98 & updated most of my dll's etc & my java is version 2 1.3.1.My java script is enabled in Explorer & netscape's & the security is at a minimum level.Please help me figure out why these other browsers work but the other's do not.I want to edit a web site of mine but I can't because of this problem.I am very frustrated by this and need as detailed help as I can get.Anything of a suggestion would be very much appreciated.But I am also not an expert on the working's of a computer so bear with me.
BrianHi,
Well I am thinking that if anyone could know something about Java script it would be java developers.But anyways I had the previous version of explorer 5.0 & the java didn't work in it either.Now how weird is this,I opened netscape 4.7 today & the java scripts are suddenly working.This has me scratching my head wondering if my computer is possesed by some force beyond my capability to know...????Weird as it seems though the explorer still will not respond to a java script.
Brian -
Need Help With Java Query String
I'm new to Java and I'm passing data via a URL to another page(I'm not using a form). I have been succesfull in decoding the string to return the name value below:
<SCRIPT LANGUAGE="JavaScript">
function decodeSearchString() {
var nameValue = new Array();
var searchStr = unescape(location.search.substring(1));
if (searchStr) {
var formElement = searchStr.split("&");
var tmpArray = new Array();
for (k = 0; k < formElement.length; k++) {
tmpArray = formElement[k].split("=");
nameValue[tmpArray[0]] = tmpArray[1];
return nameValue
var srchData = decodeSearchString();
</SCRIPT>
However, now I need to add the value returned from the above srcipt to the Java script listed below:
<SCRIPT Language="Javascript" SRC="#srchData.link#?open&pID=PAR"> </SCRIPT>
This above script if working will add the HTML from the URL query to the page, but I keep getting a Java Error with this script. Please Help !I assume you are using a JSP page and not just solely doing Javascript. IF you are using JSP, then read on. Otherwise, I can revisit your script.
To obtain the value of the query string, you would use a method call such as:
String strQuery = request.getQueryString()
Or, to get a single parameter off the query string, you can call:
String strSearchData = request.getParameter("paramname");
Or, if you want all the parameters and values instead of just one long string you can call:
Enumeration enumParamNames = request.getParameterNames();
You can use the above enumeration in combination with getParameter() to get the values.
In order to build your script line and add the query string, you would then do something like this:
<SCRIPT Language="Javascript" SRC="#<%=strSearchData%>.link#?open&pID=PAR"> </SCRIPT>
Notice the <%= %> block in the above code.
I hope that is what you were looking for. Your example is somewhat confusing so I may have answered wrong.
Mike -
Need help with Java always get error
hey guys need help
this the problem i get :
I go to certain websites and I get this error with firefox.
This Site requires that JavaScript be enabled.
It is enabled.
This is the one of the errors in java script console with firefox.
Error: [Exception... "'Component does not have requested interface' when calling method: [nsIInterfaceRequestor::getInterface]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "<unknown>" data: no]
I have installed the java script from there home site and did a test and says everything is fine. Any ideas?
please helpHi 49ers,
Sorry not to have any real idea of how to help you out here, but this is a Java forum, not JavaScript.
Some Firefox expert may stumble across your post and be able to offer some advice (I hope they do) but this isn't really the best place to post such questions.
Try here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3
Good luck!
Chris. -
I need help with this script please ASAP
So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
The script (Sorry if it's a bit long):
#------------Startup-------------
display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
set Lolz to (button returned of the result)
if Lolz is "Cyaaaa" then
killapp()
else if Lolz is "Take the Quiz" then
do shell script "say -v samantha Ok starting in 3…2…1…GO!"
#------------Question 1-----------
display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
set A1 to (button returned of the result)
if A1 is "Apprentices" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 2--------
display dialog "Most children were taught
to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
set A2 to (button returned of the result)
if A2 is "Bible" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------------Question 3---------
display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
set A3 to (button returned of the result)
if A3 is "Great Awakening" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#-----------Question 4--------
display dialog "_______ was
a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
set A4 to (button returned of the result)
if A4 is "Ben Franklin" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 5-------
display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
set A5 to (button returned of the result)
if A5 is "Land" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 6--------
display dialog "The first step toward guaranteeing these rights came in 1215. That
year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
set A6 to (button returned of the result)
if A6 is "Magna Carta" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#----------Question 7--------
display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
set A7 to (button returned of the result)
if A7 is "Parliament" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 8-----
display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
set A8 to (button returned of the result)
if A8 is "King James II" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 9------
display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
set A9 to (button returned of the result)
if A9 is "William/Mary/Glorius Revolution" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 10-----
display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
set A10 to (button returned of the result)
if A10 is "Rights" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 11------
display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
set A11 to (button returned of the result)
if A11 is "Ohio" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------Question 12---------
display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
set A12 to (button returned of the result)
if A12 is "George Washington" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#---------Question 13-------
display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
set A13 to (button returned of the result)
if A13 is "Ben Franklin" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#--------Question 14------
display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
set A14 to (button returned of the result)
if A14 is "" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#-------Question 15-------
display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
set A15 to (button returned of the result)
if A15 is "Command an attack against French" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
#------TheLolQuestion-----
display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
set LOOL to (button returned of the result)
if LOOL is "Mr.White" then
do shell script "say -v samantha Congratulations…you…have…common…sense"
else
do shell script "say -v alex Do…you…have…eyes?"
#------END------
display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
set endmenu to (button returned of the result)
if endmenu is "I did!" then
do shell script "say -v samantha Your awesome"
else
do shell script "say -v alex Go outside and run a lap"
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end ifUse code such as:
display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
set A1 to (button returned of the result)
if A1 is "Apprentices" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
return
end if
#----------Question 2--------
display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
set A2 to (button returned of the result)
if A2 is "Bible" then
do shell script "say -v samantha Correct Answer"
else
do shell script "say -v samantha Wrong Answer"
return
end if
(90444) -
Need help in creating script for "Task Schedule" in Oracle E-Bussiness Suit
Hi,
I need some urgent help regarding the scripting of Oracle E-Business Suite application. I am new towards working on Oracle Applications. I have been using LoadRunner 11.0 and protocol oracle applications 11i for the scripting of the application. The problem is as follows:
Scenario- Schedule an incident to a resource.
1) Log in to the application.
2) Open Oracle Forms Page.
3) Enter the details of the incident number.
4) Right click on the incident number and then select “schedule” option.
5) Check / Select the resource listed in the new form.
6) Click on “schedule” Button.
7) Exit the oracle forms.
8) Logout from the application.
I have recorded the scenario but when I try to run the script, it fails after completing the 4th step from the scenario mentioned above. I have done all the required co-relations..
Another issue that I have noticed in the scipt is that it records a lot of requests to the AppsTCFServer.
When I check the Tree View of the script, I have found that there are around 25 requests to the AppsTCFServer recorded in the script. In the header of these requests a TCF Start/Session number gets generated randomly. This number stays the same in few AppsTCFServer request headers and then a new number gets generated and the cycle continues.
However LoadRunner does not generate this number by itself during replay. I cannot find this number in any previous responses.
In the last few days, I have tried my hands on Oracle Openscript tool to record the above scenario, but still I am getting the same problem, i.e instead of getting the correct response from the server for the AppsTCFServer requests, I am getting the message "X-session 7098.... not found - aborting ".
I get this message whether I use LoadRunner tool or the OpenScript tool.
Please help me solve this issue.
Thanks & Regards,
Soumya MukherjeeThis isn't much of a "code-sharing" site but a "knowledge-sharing" site. Code posted me may be from a questioner who has a problem / issue / error with his code. But we don't generally see people writing entire scripts as responses to such questions as yours. There may be other sites where you can get coding done "for free".
What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
But the expectation here is for you to write your own code.
Hemant K Chitale -
Exactly I find this beautiful script to twitter in shell with curl but the problem it ouputs the result but I don't really like that . I want it works silence, just update, no output needed.
I'm new to shell scripting, I need help from you mates . This is the one :
twit ( ) {
curl -u usr:pass -d status="$*" http://twitter.com/statuses/
Last edited by nXqd (2010-08-04 05:27:44)twit ( ) {
curl -u usr:pass -d status="$*" http://twitter.com/statuses/ > /dev/null 2>&1
http://www.xaprb.com/blog/2006/06/06/wh … l-21-mean/ -
Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
thanks in advance
Rehan MIrzaHere is a good link that indicate that JavaBean is not only for applets
http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
quote:
The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
Francois
Maybe you are looking for
-
Is there a way to import content from a wiki into InDesign?
Hi all, I'm writing the documentation for a software product and I'd like to use a wiki to create the documentation using several users to author the starting content. However, an export from a wiki is never very attractive so I'd like to be able to
-
Please get the web site designers to fix this forum. There is no Z30 "place" and there is an error message that shows up every time. The specified template does not exist or is empty
-
Why wont home sharing load my library?
it just continues to say its loading and it never does
-
hi all, my user want a report of task list requirement is listed below user fills task list in order generated automatically. they want to get the report of task list filled against order no and equipment. is it possible through standard reports or i
-
JTable sorting in 1.5 using AbstractTableModel
Hi, I have a JTable with 7 columns, that uses AbstractTableModel. The Jtable is updated with contents from xml file. I have heard 1.6 provides classes that makes sorting easier, but I need to implement this using 1.5. Could any one provide a sample c