Filename is just the extensionless web page name e.g. "Addresses"
Problem is of course every window popped up will replace the previously
popped up window and in the case of a popped up window popping up a window
the new window will just replace the calling window.
(Please, no lectures on popping up windows, I need to in my particular case
and here I'm just stripping it down to the bare problem for claritie and
simplicities s sake)
I'd be happy if I could create a new window handle each time so that all my
popup windows will be unique. If it could be the filename that would be fine
e.g. instead of the window handle variable being "LinkWindow" it would be
"Addresses". Is there some way of making the variable I assign the new
window to a variable? All I can come up with is somehow having LinkWindow an
array of window handles and just keep incrementing it e.g.
LinkWindow[100]; // 100 is more than enough windows for a typical session
LinkWindowCount = 0;
I was wondering if it is possible to target a named anchor in a frame when opening a new window with a javascript function? has anyone actualy been able to do this?
I'm opening a new window that contains a simple frameset (topFrame,mainFrame). On the mainFrame page I have along list of service descriptions each with their own named anchor.
Here is the script i'm using to open / center window in browser (script is from 'ultimate window pack' extention for dreamweaver): Code:
I have some scripts that uses activex objects for InternetExplorer to get the browser handle.i get the handle of the newly create browser into IE variable and from there I was making my script work on the browser.In IE6, IE7, IE8 browser this works perfectly fine.How ever, recently I have upgraded my IE6 browser to IE8 since then my scripts are not working as expected.Is there any way in javascript to get the handle over the browser with full access.
I'm relatively new to jQ and would like to determine if a named window is already open. If it is then I want to change focus to that window/tab. The scenario is this. I have a link in App1 that opens a new window to an already existing linked (related) web form in App2. If the user forgets they have that window open in App2 and clicks the same link in App1 as before (to open the related form in App2,) it opens a window that is not the same window as the original window. I need App1 to detect if a window already exists in the browser of the same name and if so, change the browser focus to it.
I have found out that doing a window.resizeTo(w,h) does not resize the client area tot his size, but the entire window (including tool bars etc).
So, with an address bar, a tool bar and a status bar etc showing, the window.document.body.offsetHeight value will be ~200 points smaller than the required size.
We have a simple set of data in a table, but it can resize based on a font size. On change of font from a combo we call a resize function.
How can I ensure that the body.offsetHeight and widths are enough to show all of my table, without hard coding for toolbars etc (Because they may not be there on some browsers.)
Is there a way like in java to *pack* the client area to best fit?
how to handle window close event in all aspects? i.e. when window is closed using close button alt+f4 and closing the window by right clicking on the task bar
HI'm working on a website and i was asked to add a fancy fade in effect which after a ton of scourcing the web i managed to find and get to work
function fadein(){var fade=0, fadein=document.getElementById("Astuces").style,ms=(fadein.opacity==0)?0:1, pace=setInterval(Fade,30);[code]....
Now for the index page there are multiple images that i want to have fade in one after another. What i did was copy the above code a 5 times and change the function names. It worked like a charm in both Chrome and Firefox however IE as usual is being a partypooper. it appears that IE does can not handle multiple "window.onload" which causes only the first image to slowly fade in.Here is my current code, how can i make it IE competable?
function fadein(){var fade=0, fadein=document.getElementById("Astuces").style,ms=(fadein.opacity==0)?0:1, pace=setInterval(Fade,30);[code]....
I use named anchors to take users to specific parts of a long page. But I want to add some processing and do some things with my nav bar when users go to certain sections delineated by named anchors. I understand that the anchors array creates an element for each anchor in the page when the page is loaded, but how do I identify which anchor is currently being viewed?
Here's some pseudo code:
if (document.anchors.name == "section_B") {
then do this or that
}
But what do I test to determine the current anchor name?
What about using id's instead of names? Can the anchors array return anchors created with id's as well as names? Would this be of any benefit?
IOW, why are there 0 elements named div at the time the <body> element's onload handler is invoked? When can I retrieve this named div from the document hierarchy?
This exercise is necessary since code I have written using the DOM (that works) has to run on God-forsaken browsers such as IE 5.1 for Mac whose support for the DOM is spotty at best.
For each element in the currently loaded markup page that has an 'id' attribute, elements can be accessed like-
var elem = document.getElementById("foo"); - ("foo" is the 'id')
now i want to implement a shorthand method which can give me the element just by this:
var elem = document.foo; -("foo" is the 'id');
For this , i will have to add properties to the global "document" object for each element in the currently loaded page that has an attribute. These properties should be added when a page is loaded , and should be removed when a page is unloaded..
How can i dynamically add and remove property to an object.
I have a little problem that doesn't seem to be working. I'm trying to access a variable using its string name which is passed when the function is called Code: ie:
// I would call this function like so... a("temp1", othercrap...);
The variable temp1 is set in another script file. I don't specifically know which variable I will be passing to the function a(), all I have is its string representation. I can access the values of temp1 if I specifically call it but I can't seem to figure out how to call it dynamically.
$(function () { $('select[id$=lstOwnership]').bind("change keyup", function () { if ($(this).val() == 2) {
[code]....
Based on this logic, I'd like to show/hide the ID tag based on the values of a drop down list and another textbox. They both work fine but the problem I'm having is that each can cancel out the other. For example, if the 'txtPercentOther' textbox value is 3 and the drop down item has a value of 2, the ID tag is shown which is fine. But if I were to change the drop down list value to something else, it'll hide the ID tag, even though the other text box still has a value of 3 which means the ID tag should remain shown. I'm wondering if I maybe need to name my function so I can call the other in each.
I've been using jQuery for some time now but this is the first time I've run into something odd. Currently I'm developing a Theme for Concrete5.4.0.5, which automatically includes jQuery 1.4.2 - meaning, I can't use any other version of jQuery, that said: here is my problem.
I've got the following HTML (heavily simplified): <nav id="mainNav"> <ul> <li>Home</li> <li>Text <ul> <li>Subnav</li> </ul></li> <li>Text <ul><li>Subnav</li> </ul></li> </ul></nav> <section id="contentWrapper"> ... </section> And the following JS-jQuery Code (original, not simplified): function hoehenAngleichen(){ if($('#mainNav').height() > $('#contentWrapper').height()){ $('#contentWrapper').height($('#mainNav').height()); }} $(window).load(hoehenAngleichen); /* works fine until here */ $('#mainNav li').bind('onmouseover onmouseout', hoehenAngleichen); //will not trigger
I want the "hoehenAngleichen" function to be triggered whenever someone is hovering or leaving a li-Element. But this code seems not to bind the events with the named function properly.
I have ONE page which consists of php, html, and javascript, all on the same page. I have 3 different listboxes on a form, their named id's are: "strike", "grapple", and "strength". I have a span tag named id as: "pa". I Have a variable which is constant and named $totalValue and its vale is: 30, I have another variable named: $availableValue which will get its initial value from $totalValue. What I want to do is this, a user will choose his/her first list box. When the uses clicks the arrow on the listbox it drops down filled with values to choose from, these values come from the $availableValue variable and should be displayed as: 1,2,3,4,5,etc,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag.
The user will then choose his/her second listbox, upon clicking that arrow the listbox drops down displaying the REMAINING values from $availableValue variable and displays them as: 1,2,3,etc,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag. The user will then choose the last listbox, and upon clicking its arrow the list drops down with the LAST REMAINING values from $availableValue and will be displayed as: 1,2,etc,etc, after the user makes their selection the value of $availableValue is decreased by the amount of the user's selected choice and the value of the $availableValue is displayed on the html part of the page in a span tag.
The user should be able to choose which ever listbox he/she wants as their first listbox. So for argument's sake lets say the user chooses listbox "grapple" first, but of course the user could have chosen any of the 3 listboxes first, but he/she choose "grapple" first. The "grapple" listbox should fill with values 1 to 30, ex: 1,2,3,4,up to 30, the user selects value 5 from "grapple", the $availableValue variable will decrease by 5 and the value of $availableValue is displayed in a span tag. The user then chooses listbox "strength", its values should be filled and displayed with values from 1 to 25, the user selects 8 from "strength", the $availableValue variable decreases by 8 and the value of $availableValue is displayed in a span tag. Finally the user selects listbox "stamina", it listbox displays the values from 1 to 17, the user selects 17 from "stamina" and the $availableValue variable decreases by 17 and the value of $availableValue is displayed in a span tag. All this should happen BEFORE I submit the form via php code.
The code below, including the html, is ALL on one page named: createfighter.php <?php $totalValue = 30; $availableValue = $totalValue; $action = $_REQUEST['action']; $strike = $_POST['strike']; $grapple = $_POST['grapple']; $strength = $_POST['strength']; ?> .....
I've recently started developing javascript using jQuery and so far I'm really enjoying it.Being a professional programmer (mainly C, C++, java and python) there is one thing that's been puzzling me regarding variable scope and unnamed function declarations. Let me exemplify:
------------------------ var sum = 0; $(xmlobj).find("item").each(function(){
Named anchors and browser back button? Go here and click through the nav items at the top. Now click the browser back button! See how you have to now go back through all those named anchors? Is there some way using JavaScript (I imagine) to bypass all those?