Alter Code To Remove Scrollbar & Address Bar - Only Work In IE
Jan 7, 2006
It's been too long since I've used javascript! What do I need to add to this code in order to remove the scrollbar (or scrolling option) and the browsers' address & tool bars?
Code:
<script language=javascript>
<!--hide from old browsers
window.resizeTo(600,500);
window.opener = self;
//-->
</script>
The above code is in the <head> of the page that is being resized and stripped of scroll/address/tool bars. And will it only work in IE?
I am a novice, almost to an intermediate-level JavaScript guy, so much of this is new to me. I appreciate your patience reading this.
I have a routine that creates some HTML on the fly (updateFilters() function) and after the HTML is created, I attempt to access some fields (elements) on the form itself.
I works fine if I place an alert() statement after the HTML is created, but when I remove, the code errors out.
I have tried the setTimeout() statement, but I cannot grab the element --- undefined or null is returned. It seems that the form is the only element I can get a handle on --- everything else is undefined or null...
Here is the code:
function editQuery() { var f; var x; var myForm = document.forms[0]; // Get the row filters that were used in the last query.. for (f = 1; f < 16; f++) { var filter = eval("myForm.FilterList_" + f); if (filter.selectedIndex > 0) { var methodElement = element("FilterMethod_" + f); var methodIndex = methodElement.selectedIndex; var savedFilterMethodValue = methodElement.options[methodIndex].text; var choicesElement = element("FilterChoices_" + f); var choicesIndex = choicesElement.selectedIndex; if (isNaN(choicesIndex)) { var savedFitlerValues = choicesElement.value; } else { var savedFitlerValues = choicesElement.options[choicesIndex].text; } updateFilters(filter); // update the filters // take the saved methods and values and then update the selections // Alert here makes the code work.. // alert("Try this"); // Wait for HTML.. setTimeout("completeEdit()", 1000); function completeEdit() { // Since the object was updated, get the object again.. var methodElement = element("FilterMethod_" + f); for (x = 0; x < methodElement.options.length; x++) { if (methodElement.options[x].text == savedFilterMethodValue) { methodElement.options[x].selected = true; break; } else { methodElement.options[x].selected = false; } } // Since the object was updated, get the object again.. var choicesElement = element("FilterChoices_" + f); for (x = 0; x < choicesElement.options.length; x++) { if (choicesElement.options[x].text == savedFitlerValues) { choicesElement.options[x].selected = true; break; } else { choicesElement.options[x].selected = false; } } // Only display next row if f = 2.. // If only one row was used, no reason display the next row.. if (f == 2) { displayNextFilter(f - 1); // display it } } clearTimeout(timeOut); } } }
Do I have to pass the object (the form, the elements) to the completeEdit() function in the setTimeout() statement?
At the moment, the script creates a gallery with thumbnails from a list of images (from my basic understanding), and I want to add to it so the current code also picks up the text from the alt tag and displays that within a div box positioned absolutely elsewhere on the page, when the main image is displayed.Here is the javascript:
var gal = { init : function() { if (!document.getElementById || !document.createElement || !document.appendChild) return
I have tried numerous attempts in getting the Address field to work (i.e. validated). I want it to accept letters, numbers, spaces and commas! However, it won't let me! Below is the code I have provided.
Let me give an example: javascript: var myvar=10; function myfunc(){}; void(0); After excuting the above js source code in the address bar of my browser, I can use window.myvar and window.myfunc() to access myvar and myfunc. This indicates that the above "address-bar javascript code" must have been stored somewhere in the current page.
My question is: where is the "address-bar javascript code" stored in the current page? or equivalently, is it possible to retrieve the "address-bar javascript code" by using some other javascript codes?
I checked document.childNodes and document.documentElement, but cannot find the javascript source code. Maybe the source code is stored in the window object? How to retrieve it?
This works fine when I place this code under the html in the main source, but if I try to add this Jquery code to an external js sheet it doesnt seem to work?
Currently my js sheet is called in the header, when I move this link to the footer of my page the code works again, so Im guessing this has something to do with where the jquery code is placed in relation to the code Im trying to hide?
How I can keep my js in the header but still make the content disappear on click?
I have a page where I need to insert some html elements dynamically and I use append. It seems to work fine. But then at a later point I also need to remove the elements I added and I am using the remove function but does not seem to work. As you can see in my code, I tested the effect on the element by storing the html both before and after calling the remove method. But both variables (before and after the remove function call) holds the same html. In other words, the element that was supposed to have been removed is still there.
I am trying to put a remove link beside each newly created input. It doesn't work. It only works if I put the remove link in the HTML and not inject it dynamically. Can anybody work out why this would be?
What I want to do is remove some lines of code, because more lines are bad and I hate them. I'm all about minimal lines in a project. I'm also all about making quality projects that can be easily changed, edited, updated, etc.
So what I need is a way to minimalize the following block of code, and make it available in a seperate javascript source file (*.js)
my script that works in firefox/opera like a charm, but doesn't so in IE8.
Here we go:
$(document).ready(function(){ $(".folder").live('click',function(){ var id = $(this).attr("id"); if($('#' + id).hasClass('folderClosed')){
[Code].....
The basic idea is to show a "virtual" directorie from a mysql database over json. The first part works also quit well, only the .remove() function doesn't work right, which means the sub <ul> elements remaining on the page.
Right, "confirm." Not "verify." Please help if you are willing. It needs to also have a pop up or something that says it doesn't match what was previously typed. It also needs to require the character "@".
Here is what someone gave me in php but I can't get it to work:
i want to add the link address when clicked on the link in web page to the outlook express address book when the outlook window populates. i tried to put
<a href="mailto:enquiry@mydomain.com" > click here </a>
but it only add address to the To section of outlook window, i want it should store the address in the address book.. of outlook express..
I have been looking for a solution for a long time. I have embedded a SWF app in html page using SWFObject. Now I need to give the Flash app the address where it is currently embedded, since the same SWF file is embedded in more than one locations! So the Flash app is supposed to pull the right content according to its current position
I've tried to address this issue multiple times, and yet IE 8 simply ignores it. I know jquery has the capability of operating correctly with other examples, but the below code just doesn't seem to satisfy it.[code]