Find Window Like Function
Jul 23, 2005
I would like to include a 'back to page' link on my website.
This link should load the target page when it's not currently open and
set focus to the window if it is.
in pseudo code
win = FindWindow("Products.htm");
if (win ==0) open("Products.htm");
else win.focus();
The page is not in a frame.
Does anyone have any suggestions?
View 1 Replies
ADVERTISEMENT
Dec 6, 2010
I am having some difficulty in constructing a window.confirm() function that works with my code.So if the form data is valid, I need to use a window.confirm() dialog box to show the user's total cost based on the rental rate of equipment chosen and the reservation period. The user must accept the cost by pressing the confirm button, and if user cancels do not submit data.I have written this code but cannot figure out how to find the number of days from the 2 date fields and use that to calculate and display the total cost.
//confirm submit and display rental cost
var equip = document.forms[0].equipment.value
var pDate = document.forms[0].pickupDate.value[code].....
View 5 Replies
View Related
Sep 13, 2011
I have a small problem which I haven't succeeded to find any answer to. How do I get this to open in an external window?
$("#id").click(function() {
window.location=$(this).find("a").attr("href");
return false;});
View 1 Replies
View Related
Feb 8, 2010
I need to find the position of an element on the page relative to the browser window. Its part of a popup calendar script (and no, they don't want to change it so please don't suggest jQuery date-picker etc) The script uses these functions [url]... to find the position of the anchor to pop up the calendar next to it.
Now the client wants to make the calendar fixed when the user scrolls so that it always stays on screen. The most graceful solution is using css position:fixed (I'm aware it doesn't work in IE6 - that's not a problem)
I've been using the getAnchorWindowPosition function to get the coordinates but the numbers its giving are wrong (to different degrees depending on the browser) It was only 200px out in the Y axis in Firefox but in IE7&8 its off the screen.
View 7 Replies
View Related
Dec 22, 2010
Quick question. (I tried to use firebug but have no idea how to do it correctly)I have got some button at page. After click it triggers some function. How to exactly find out what is the name of this function and which library (file) loading it.
View 2 Replies
View Related
Apr 5, 2011
i've written a js function to find the difference between two dates. the format being used is dd/mm/yyyy hh:mm. The function returns correct value when give one set of values, but go wrong with another set. examples are given below.
set 1 : Time 1 = 24/02/2011 09:30 , time 2 = 24/02/2011 16:00
Output is corret here. It gives 6 Hours & 30 Minutes (after converting the difference)
set 2: Time 1 = 24/02/2011 09:30 , time 2 = 25/02/2011 16:00
Here, it gives 31 days, 6 Hours & 30 Minutes. My code is given below. Also the alert of dates display strange values. Don't know if it is timezone issue.
function compareDateTime(frmtime,totime)
{
var date1 = new Date(frmtime);
var date2 = new Date(totime);[code]......
View 5 Replies
View Related
Apr 16, 2011
< input onClick = "someFunction()" ../>
< input onClick = "someFunction()" ../>
how to get those two elements into array, like with getElementsByName ?
View 4 Replies
View Related
Mar 31, 2010
I have recently started seeing a script that puts like a dark grey transparent mask over the intire browser window, while putting up in the center a highlighted visable login form or some type of box requiring user input. Can anyone tell me if that is javascript and possibly point me in the direction where I can find out more about that effect.
View 3 Replies
View Related
Aug 20, 2010
I have a div like this:
And when I run this in firebug:
It does not return the div's with the same number.:
I would like to aggrigate each div so that for example :
Is edited to:
How would this be done?
View 1 Replies
View Related
Jan 8, 2010
When a webpage is calling a javascript function within the <body> </body> tags, is there a quick way to find the code for that paticular javascript function without having to manually search through every external script. I don't have access to the server so I need to find the code for the javascript function from the front end. If it helps you I am using firefox with firebug I also have the web developer toolbar installed.
View 2 Replies
View Related
Sep 28, 2010
Is there any way with Firebug, or any other tool, to easily find which functions are being called by which page on load?I need to optimize a huge pile of JavaScript files for a large website.
View 2 Replies
View Related
Jul 20, 2011
When the tabs are initialized by this code:$( "#tabs" ).tabs(); , it displays the tabs in a way that I don't like. I want to trace into the actual 'tabs' function when this is called so I can see why it is doing what it is doing. I have not been able to find where this code is sitting.
View 2 Replies
View Related
Apr 23, 2011
I want to preserve a 16/9 aspect ratio to the window after any resize, making the width a function of the height.
As I have a window.resizeTo() inside the window.onresize event function, the infinite loop is served. How may I quit it?
<html><head><title>Title</title><script languaje="javascript">
const c_ra=16/9;
window.onresize = function WindowReSize() {
var myWidth = 0, myHeight = 0;
[Code].....
View 2 Replies
View Related
Apr 20, 2009
How do i use a function to find the average of the values in an array of numbers passed as argument to a function.(using java script) thank you for your help...
View 1 Replies
View Related
Jan 18, 2010
I have created and opened a child window called "checkwin" and have written some data to it. If the data is valid, I want the user to click on the 'CONFIRM' button on the child window, at which time I want the "submit()" function for the form on the parent window to be executed. If the data is invalid the user clicks on 'MODIFY' and I want focus to return to a field on the parent form. However, when I click on the "CONFIRM" or "MODIFY" buttons on the child window, nothing happens. Here is the code:
checkwin.document.write("</td></tr><tr><td align='right'><input type='button' value='CONFIRM'
onclick='opener.document.personnel_form.submit()'></td><td></td><td><input type='button' value='MODIFY'
onclick='opener.document.personnel_form.first_name.focus()'></td></tr></table>")
View 1 Replies
View Related
May 27, 2009
<div>
Is it possible find a node backwards instead of forwards.
I would like to do (remember find_reverse does not exist)
View 7 Replies
View Related
Mar 29, 2011
It is possible to perform a find in page search that looks at a specific link, opens the page in a new window and finds the text within that document?? Basically I regularly use an html page in work that has a list of people and their telephone numbers. I want to be able to type in a searchbox on my main page and it open the target page and find the name I am looking for? Is this possible or can you only Find In Page on the same page or another frame?
View 1 Replies
View Related
Feb 14, 2010
Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.
Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.
I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?
View 3 Replies
View Related
Jan 5, 2012
so i wrote this slider with some help from an admin, everything works as I would like it to but I'm trying to make it a plugin so i need to tighten up a certain part of the code:
(function( $ ){
$.fn.jmSlider = function() {
// get total width of all li elements in the slider
var wrapWidth = 0;
[code]....
what i would like to do is instead of using "li:first" and "li:last", i would like to use first-child and last-child so the element doesn't need to be a li, in can be anything that is the direct child of the parent container.
View 2 Replies
View Related
Jul 23, 2005
I have created a form. Within the form is a button to close the window
on click and to validate as well. The close window works when it is a
stand alone, but it does not work when it is embedded with the other
code. Here is the code I am currently using:
<p><font face="Trebuchet MS">
<input type="submit" value="Send" name="B1"
"MM_validateForm('Manager
Name','','R','Managers Extension','','R','Department','','R');return
document.MM_returnValue">
<input type="reset" value="Clear" name="B2">
</font></p>
View 6 Replies
View Related
Jul 13, 2007
function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}
I need to change this function to DO NOT open "slidelinks" in new window, but in same window as the image witch uses this function.
View 2 Replies
View Related
May 8, 2003
say I have a pop-up window, can I call its functions from a completely different browser window??
View 1 Replies
View Related
Jul 31, 2001
I've improved the vbcode.js script for this forum software.(vBulletin) The impovement is, when you add a smilie or vbcode it is added at the point where the cursor is instead of at the end of previously written text.(only works with IE)
Here's my problem. When the user clicks on a smilie in the get more smilies popwindow, it calls the function created in the newly opened window instead of my enhanced function in the original window. How can I get the links in the small popup window to call the function in the original window and pass the smilie code to it also? It must be possible or are all objects of one window totally seperate from the other?
View 3 Replies
View Related
Dec 4, 2007
function test1(){
window.open('about:blank','TEST','width=300,height=300,resizable=1');
}
function test2(){
window.open('about:blank','TEST','width=300,height=400,resizable=1');
}
I create 2 buttons and set onclick to test1() , test2() respectively but I tried to click on button1 (call test1()) and click on button2 (call test2()) the windows popup which call from test2() has height=300. I want to popup with height =400 and I don't want to close window popup which call from test1().
1. Call test1 function (the windows's popup width = 300 ,height=300)
2. Call test2 function (the windows's popup width = 300 , height =300 <= I want height =400)
View 4 Replies
View Related
Jul 27, 2002
Is it possible to call a window's function from another window? E.g. refresh ...or any other Javascript function?
View 9 Replies
View Related
Oct 30, 2010
I'm developing a chat module for our cms. Its working mostly, but I need to make it so that in some situations when someone closes a window that it does a xmlhttprequest to mark the session as closed.Some lite reading seems tell me there is no onclose event, but there is an unload event. Further reading leads me to believe that the unload event may not work when a window is closed.
View 2 Replies
View Related