DHTML Floating IFrame - Help Testing/correcting
Jul 23, 2005
Don't know if this is the right place to post this JavaScript issue. If not, could someone point me in the right direction please.
I am trying to make a "cross browser compliant" floating iFrame. Not real fancy, just load, resize and move.
But, I do not have the browsers, OSs and different machines (like Mac) to test the code on.
So I need some help to see where this basic example of works and does not
work. That is, some help testing and correcting it if possible.
So far, I know it works on these: IE6 Win98, IE6 Win2000Pro, Netscape 7 Win200Pro, FireFox XP Home & XP Pro and IE6 XP Pro. But what about, PC IE5, IE5.5, Opera, and Mac (all), as well as others I've omitted.
View 6 Replies
ADVERTISEMENT
Jun 17, 2011
One of the features of a site I'm working on is a button similar to the Facebook "LIKE" or Twitter "Tweet" [really exciting stuff to help with, right? ]
As such I need to be able to open an iframe as a layer on the page but can't load up a framework given the weight and potential for conflicts. The goal here is to be as light as possible while also avoiding conflicts. The page is multi-part so a simple layer won't do, it has to be a full fledged iFrame with the ability to fade the underlying window and close it down while also floating over page elements, drop downs, even flash.
Colorbox-min would be an ideal solution but the dependancy kills it. I do pretty well with frameworks but on my own am a JS novice. In a world full of ready made scripts,
View 5 Replies
View Related
Jun 21, 2009
Entire Code Sample:[URL]I can get this code to work no problem if I create a second iFrame ("iNav") just to load the DHTML menu into. EX:
Code:
var FirstLineFrame=parent.iNav; // Frame where first level appears
var SecLineFrame=parent.iNav; // Frame where sub levels appear
var DocTargetFrame='icontent'; // Frame where target documents appear
However I would like to avoid this as I really just want the single iFrame on my page and then dynamically load content into the iFrame via the DHTML menu.
View 1 Replies
View Related
Dec 23, 2007
I am trying to put together a proof of concept. What I am trying to prove is that a back button affect can be accomplished using DHTML and an IFrame. Here is the concept, as the user changes data, that data can be written to an IFrame. Then, when the user hits the back button, contents can be taken from the IFrame using history.back() since the IFrame should remember the content written to it just like a page would.
Here is my problem. The below code writes the content entered into the text box into the IFrame. But when I click the button to execute the history.back(), the value returned is undefined.
I think my problem might be that the code which writes the contents of the text box to the IFrame is doing that dynamically, so the page is not caching it. If this is correct, how can I write the dynamically entered content from the text box to the IFrame so it can be cached by the IFrame window? Code:
View 2 Replies
View Related
Mar 3, 2010
I am using a dhtml "Image Slideshow", and I was really happy with I customized its layout to my needs, and it runs perfectly on FF and on IE (wich is very important for me, since in my country most of people still use IE). Check it hereHowever, when I insert the slideshow in my design, it stops working on IE (working in perfection on FF):I am using the original slideshow file in an iframe.(before I tryed to paste the code directly into the page, but it didn't worked, so I thought using an iframe would work, because the code of the original document would be intact)
View 5 Replies
View Related
Jul 3, 2011
Onchange of the dropdown list, the textfield should display either "testing 3" or "testing 4" but nothing is happening.
<form action='submit.php' method='POST' name='form'>
<select name='preset' onchange='preset(this);'>
<option value='test1'>testing 1</option>
[code]....
View 2 Replies
View Related
Jul 23, 2005
Is there any way to test for the presence of the Adobe Acrobat plug-in
in Internet Explorer? It's doable in Netscape but so far I cannot get
it to work in MSIE.
View 1 Replies
View Related
Mar 9, 2006
I'm trying to get JSUnit to work - I've tried everything I can think
of, but I can't get the simplest of tests working - example 1 of the
jsunit homepage - Both on my server and locally, nothing happens after
clicking run - or if I'm lucky, a window pops up, blank, other than the
heading "Tracing - JSUnit".
View 1 Replies
View Related
Jul 16, 2009
i wrote a rough script to try and test which method of incrementation was faster: i+=1; i++; ++i;
[Code]...
View 9 Replies
View Related
Dec 4, 2010
I had a rethink about my problem discussed in this [URL] thread, where the function won't run properly a second time if the page hasn't been reloaded. That one appears not to have a solution, and I was thinking that a reasonable plan B is the following:
a) test if the function has already been run since the page was loaded
b) if not, run the function
c) if it has, reload the page with the onClick, then run the function automatically on reloading.
the problem I envisage is will the page "remember" to run the function once it has been reloaded?Of course, it would be simpler to do it running the function automatically once the page loads, then just reloading if the test comes back that the function has been run already, but that wouldn't work for the first time you visit the page - it would start running straight away, whereas I want it to wait for that first click. Here's the page [URL] I'm working on, if you want to have a look.
View 10 Replies
View Related
Jul 12, 2005
I was putting some javascript in a form and doing my usual testing and swearing when the javascript did not run without an error message of any type and reverting the code back until it did run and adding code til it didn't.
Then it hit me - isn't there a better way - doesn't someone have a program or utility that will help debug Javascript ???
As I'm doing Javascript it is much harder to decode than the 30 year-old Fortran programs - they typically gave a line number and variable name that was missing.
When I did Basic before Visual Basic, the editor identified errors in real time as we typed. What is available for Javascript?
View 2 Replies
View Related
Jul 23, 2005
If I have to test my code on different Netscape versions, can I download and run those versions on the same computer or will it create conflicts? And if I had to test only one version which one should it be - which one has the most common elements to all the versions?
View 3 Replies
View Related
Jul 23, 2005
I am trying to check if my new window is open and if it is change the url.
This works until I use the x in the corner to close the window. At that
point i get an error when i try to open the window again. I believe that it
is because newWindow is still active. How do I close newWindow when it is
unloaded or closed by the x. If this is truely the problem.
function openWindow()
{
if (typeof (newWindow) == "undefined" || newWindow.open == false)
{
newWindow = window.open("http://www.yahoo.com","","width=400,height=400");
newWindow.focus();
return false;
}
else
{
newWindow.location.href = "http://www.msn.com"
}}
Here's my solution, seems a little redundant though.
function openWindow()
{
if (typeof (newWindow) == "undefined" || newWindow.open == false)
{
newWindow = window.open("http://www.yahoo.com","","width=400,height=400");
newWindow.focus();
return false;
}
else
{
newWindow.close()
newWindow = window.open("http://www.msn.com/","","width=400,height=400");
newWindow.focus();
return false;
}}
View 1 Replies
View Related
Jan 15, 2007
In this piece of code (common to a number of pages) I want to set focus to a second input field if there is one.
[Code]...
View 19 Replies
View Related
Sep 2, 2009
determine what the first letter of a selector is? For example, if the very first letter of a paragraph is a quote (or a ‘ , or a “ , etc) I would like to apply a negative text- indent to the found paragraph so as to replicate "hanging quotes" that are commonplace in the print world. The code I've come up with is: $("p:contains(“), h1:contains(“), h2:contains(“)").css({'text- indent':'-0.3em'}); but this grabs any p or h1 or h2 that *contains* an opening curly quote; not what I'm looking for. I need it to select paragraphs that *start* with the opening curly quote. Incidentally, I could not get this to work when I was searching for $ ("p:contains(“)... but it worked when I entered an actual opening curly quote in the search (as above top). I tried both single and double escapes too.
View 3 Replies
View Related
Aug 2, 2011
jQuery - slideToggle, testing if up or down
I have a simple slideToggle that slides a sub menu up and down
Code:
$('a#btn-portfolio').click(function(){
$('#sub_menu').slideToggle('slow');
});
[Code]....
View 3 Replies
View Related
Mar 10, 2004
does anyone know how I can test, in javascript, which of several buttons was pressed when submitting a form? Currently, I use the onSubmit event handler to call a form validator function, and it is in that function which I would like to test which submit button was pressed. Anyone know?
View 3 Replies
View Related
Sep 27, 2006
Is there any way to test if there is overflow in a text area (i.e. a scrollbar is displayed)? This is a read only field so I could change the textarea to a div if necessary.
View 1 Replies
View Related
Aug 7, 2010
If I define two arrays identically and test for their equality I get a "false".
That is,
Code:
So I thought perhaps == could not be used to compare arrays.
But the following:
Code:
Why the first comparison fails?
View 5 Replies
View Related
Mar 27, 2011
Is there any way to detect through Javascript whether a browser supports a particular property of CSS? I am experimenting around with CSS3 and I would like to be able to detect whether the browser understands what to do with a particular setting, as in "elementRef.style.newCSS3_property = '3px' " I have heard, although I do not know if its true, that there is some way to access whether the browser knows what such a declaration means.
Does anyone out there know how to do this?
View 10 Replies
View Related
Apr 13, 2010
I have the following code:
Code:
<script language="javascript">
<!--
// Max number of items to show/hide
[Code].....
Which is designed to hide all but one of a group of DIVs with consecutive IDs in the form "listings_stations_<number>". The problem is, I won't know how many of these DIVS there will be. I know a maximum possible number though.
The script as-is works, but obviously throws up errors trying to get handles to non-existent elements/objects. How can I check an element exists before getting and setting style properties for it? I'd like a solution that works for all three browser-types the script currently works with.
View 1 Replies
View Related
Jul 23, 2005
I'm trying to check for this bug with the following script and it
*seems* to work. In IE it reports "bubbling" and in Firefox "not
bubbling" but I really have no direct way to confirm the Firefox
results until the bubbling bug is fixed.
Basically the test script assigns an onscroll event handler to a
textarea and then scrolls the textarea down then back up, checking to
see if a the event handler works (assigns the "bubbling" variable a
"true").
I had to code things with a few settimeouts otherwise Firefox, unlike
IE, wouldn't display the down then back up scrolling of the textarea.
Which may have been a problem.
Lacking a "debugged" Firefox browser, is there some further (indirect?)
tests and/or rational that would support or discredit this script as a
valid onscroll event check? ....
View 5 Replies
View Related
Aug 10, 2010
Is there any way to use an if statement to see an element is currently hidden or displayed?like:
var child1 = $('#divImgH1');
if (child1.IsVisible())
{ do something;}
View 4 Replies
View Related
Nov 6, 2011
So firstly this is likely not in the right place at all, as it's a bit OT but I figured it's the best place to ask. I have to document 4 different tests to my code; what structure should I take when doing this?
I was thinking:
* State the aim of the test
* State the inputs, and what I believe the output should be.
* State the actual output, and whether this positively or negatively affect my code.
View 1 Replies
View Related
Oct 13, 2011
I'm working on a script that calls my php file, checks the db and returns text. If the returned text="bad" then i want the var "bad" to be set to 1. at the bottom of my script, if anything has tripped bad=1 then it returns false and the form doesn't submit...everything works great except for this one piece so i was wondering if you guys might offer me some insight
[Code]...
View 2 Replies
View Related
Mar 22, 2005
Does anyone know how you can test if an applet's method exists before you try and call it?
for example, if you don't have a JRE installed on your computer and try and access an applet method it shoots out a javascript error at you. I want to be able to test if the applet is operational basically before I try and use any of its methods.
View 2 Replies
View Related