Gekco Engines And Dynamic Script Src
Nov 22, 2002
I've been struggling with the following:
In Internet Explorer you can dynamically change the src attribute of a script tag - and the new src will be read and parsed.
In Gecko browsers - the same is not true:
var oR = document.getElementById('something');
alert(oR); // Check we have an object - in case Javascript console misses the error
oR.src = 'test.js'
test.js would have a simple alert in it... nothing!
So I tried the following:
var scr = document.createElement('SCRIPT');
scr.language="Javascript";
scr.type="text/javascript";
scr.src ="cat.js";
document.body.appendChild(src);
Still nothing...
I tried setting the src after adding the child, nothing.
Does anyone have any ideas on how to achieve this - short of opening a new page in a new window and document.writing it to that, and letting that refer to it's parent... ( just change top to self.opener) ?
View 1 Replies
ADVERTISEMENT
Dec 23, 2006
A long time ago when I used a browser that didn't support the shift or
unshift methods of the array object, I came up with an implementation of
queues that guaranteed amortised constant time dequeuing by only moving
elements in the array when the 'space' at the front of the array was as
long as the queue it represented. In modern Javascript it would look like
this: Code:
View 1 Replies
View Related
Apr 28, 2006
I use:
<noscript>
<meta http-equiv="refresh" content="1; URL=../nojs.html">
</noscript>
to detect if a user doesn't have javascript enabled with they hit pages that require javascript. The problem is that search engines follow this, so the content for my javascript pages show up as my "javascript is not enabled" page.
If I add <meta name="robots" content="index,nofollow"> to the noscript block, will that solve my problem, or is there a recommended way to do this?
View 2 Replies
View Related
May 26, 2009
i want to know about the use of java script codes in website. How will this affect the websites rankings in Search Engines. what are the advantages and disadvantages of Using javascript codes in websites.From SEO point of View.
View 2 Replies
View Related
Oct 24, 2009
I'm creating different pages on a website for each branch in the country for a business. The way the user gets to their branch is through a dreamweaver generated jump menu.My question is: Will search engine robots crawl the pages that are linked via the jump menu?So for example the page for the London branch can only be navigated to via the jump menu (or typing in the url in the address bar). Will a search engine index this page?The jump menu script is below:
<script type="text/javascript">
<!--
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
[code]....
View 4 Replies
View Related
Aug 27, 2009
is it possible via Javascript to search certain websites with certain keywords without having to use specific search engines?
example search only the following:
1. www.yyy.com
2. www.aaa.com
3. www.zzz.com
for the keyword "Laminat" and open the sites accordingly.
View 8 Replies
View Related
Jun 29, 2010
how to populate a dropdown based on Another dropdown selection. This all should be a dynamic. Eg: I have two text boxes one is TechID and other is JOB ID. When I start typing Tech ID it suggests me the list of IDs which start with the input string i have put in Tech textbox. When i select the Tech ID the jobs associated to that Tech ID should be displayed in JOB ID text box as a dropdown list.
View 1 Replies
View Related
Jul 23, 2005
I am having a problem with the last results. I can't seem to be able to
get the input2A and input3A to appear. I don't seem to have a problem
with the show and hide after a number is entered and submitted. If
anyone can answer my problem I will be greatly appreciated with a
prize. I actually have submitted it more than once and I haven't had
anyone been able to answer it yet. Code:
View 5 Replies
View Related
Jul 1, 2011
i was trying for some days now to find a solution for this. had a look at different posts and forums online, but no luck so far...is it possible to auto-create this with a loop???:
Code:
T$('infowindow1').onclick = function(){ setInfobox('1'); }
T$('infowindow2').onclick = function(){ setInfobox('2'); }
[code]....
View 5 Replies
View Related
Jun 30, 2009
I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:
[Code]...
View 1 Replies
View Related
Oct 25, 2010
I have made a script where you can add extra fields, and next to the row is a span that automatically displays the outcome from a calculation of three fields in that row. i.e. Q x (B - A) = total. Here is the bit that does the calculation:
function advCalc(selected) {
var result = Number(document.formmain.elements["quantity"+selected].value) * (Number(document.formmain.elements["provideamount"+selected].value) - Number(document.formmain.elements["supplyamount"+selected].value)) ;
[Code]....
View 23 Replies
View Related
Sep 6, 2011
I will like to know if there is anyway to view all the rules that I have currently in the Jquery validation plugin. Currently, I am trying to add in rules dynamically through the rules(add) function after adding some dynamic fields through the user inputs. the rules are added in this manner.
[Code]...
View 2 Replies
View Related
Jul 23, 2005
INTRO: I tried to clean it up for easy reading. I hope I didn't make
any mistakes.
PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see
"TAGSELECTED") to print my textboxes (see "TAG#") when more than 1
number (see "VLANS") is inputed into my form.
QUESTION: How do I make my dynamic form have a dynamic input box(which
is created by checking the checkbox and calling the functionC1) inside
it and still be able to pass the values to my php page? Code:
View 4 Replies
View Related
Apr 2, 2006
I have a .js file being generated by my server whenver teh state of somethin changes. What I need to do is whenever something is done on the main page i need the it to check the JS fiel for teh status of the camera (Then apply effects based on the values)
function server()
{
WebCam = " Logitech QuickCam Express";
Preview = "active";
MotionDetector = "inactive";
Scheduler = "inactive";
VideoRecording = "inactive";
WebserverCommands = "accept";
}
The server will automatically generate the values of the variables for me. The problem I have is after I include the js file into main page I call the function "Server()" even if the .js file changes it only maintains the original file (At the time it was loaded by my main page) What i need is a way around this without having to reload the html document
In my attempts to try other things I have the server rendering the code an html documenet inside a 0width/height IFRAME... but I tried to call the function using "parent.FrameName.server();" but this doesnt work either.. Code:
View 2 Replies
View Related
Jul 23, 2005
I have a rather annoying problem with Mac IE 5.2. I use a javascript
function to determine the x, y position of the upper left corner of
this image of the US. Since this image can be placed anywhere in the
browser, the x, y position is not always (0,0). I am also trying to
lay several dot images on top of this image so that when you click the
dot the user can find out more information about certain states. So I
determine the x, y position and add certain pixels so that the dots
will be placed in the correct places in relation to the US image.
This works well with PC's IE. However, when I open this in Mac IE, the
dots are either shifted too high up or too low in relation to the US
image. Strange thing is, when I resize the browser, the dots literally
jump to their correct places.
View 1 Replies
View Related
Jul 23, 2005
I am ripping my hair out trying to set the src (location.href) of an
IFRAME that i show once a user clicks on a certain link:
function editTimeEntry(timeEntryID, dayID, e) {
var x = e.clientX;
var y = e.clientY;
ew = frames['editPop'];
eF = getObj('editPopID');
eF.style.left = x + 10;
eF.style.top = y + 10;
window.top.frames['editPopID'].location.href =
"controls/editPopup.aspx?id=" + timeEntryID + "&did=" + dayID;
ShowFrame();
}
function ShowFrame() {
if (eF.style.display=="none") {
eF.style.display="black"; // FF Drawing bug
}
eF.style.visibility="visible";
alert("Location:" + document.frames['editPop'].location.href);
}
When the IFRAME is displayed it just shows about:blank and not the
location.href I set for it. After the first time, i click on the same
link and it shows me the correct address in the alert box in
ShowFrame(), but the iframe remains blank.
View 10 Replies
View Related
Jul 23, 2005
I need to create a variable out of nothing. From a database I extract an
item with a certain id. With this id I want to create a new variable.
For example:
id = 36;
"item"+id = new Array();
Now I get the message "Illegal left hand assignment".
I tried:
eval("item"+id) = new Array();
Is it possible to create a variable out of nothing?
View 4 Replies
View Related
Nov 28, 2006
I create a textfield on success of the previous operation.
I have written the following code. It works in Firefox but not in IE.
Please advise.
var inp = document.createElement("input");
|
|
|
inp.setAttribute('onkeydown','return trackenter(this,event)');
inp.setAttribute('onkeypress','submitAction(this,e vent)');
|
|
View 1 Replies
View Related
Jan 25, 2007
I am trying to make a dynamic table which will automatically update after running a query. My Table contains 4 columns.
I am trying to update the table by adding rows of information to it. But i am able to add only one column, how can i insert 4 columns and make the table resize automatically. Code:
View 2 Replies
View Related
Jul 20, 2005
Is it possible to make table rows visible/unvisible by javascript. If the answer is yes, can someone give me a working example.
View 1 Replies
View Related
Jul 20, 2005
In IE I have a routine that dynamically assigns objects' opacity. This works
fine for some elements but not for others.
It works for buttons and inputs but not for img, span and select.
This is the line that sets opacity from a loop through all elements:
document.forms[0].elements[i].style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=" + FadeOpacity + ")";
View 1 Replies
View Related
Aug 14, 2009
obj.style.width = oSpan.offsetWidth + 17 is not working in IE8 but works fine for other browsers.
Is there an alternate to do dynamic styling in IE8.
View 5 Replies
View Related
Oct 5, 2009
I am trying to load a page, and the filename will be different depending on current month and year. If I use the code below in the body for document.write instead of window.location it correctly displays this months page as 102009.htm. Is there a better way to do this?
<script type="text/javascript">
<!--
var months=new Array(13);[code].....
View 9 Replies
View Related
Feb 17, 2011
CODE:
I have to set the value of the input area. But it doesn't work. when i see the source of the page when displayed on firefox.
I see this, The value is right but this doesnot show in the form.
View 1 Replies
View Related
Jul 11, 2006
I'm trying to make two drop down lists. The first will be a list of regions, such as USA and Canada. The second will contain cities within those regions, such as Washington or Ottawa. The second's content will be conditional upon the user's selection of the region. I have this so far: Code:
View 20 Replies
View Related
Oct 13, 2010
I am creating an application in which I want to keep refreshing a jsp file and in that jsp file i need to keep calling another url of type www.daniweb.com/receive.jsp?a=xxx&b=xxx and save this url in database. Here the url keeps changing in every second ie. values of a & b keeps changing.
I have been able to keep refreshing the jsp file but unable to call another dynamic url in it. Please tell me how to do it in my jsp.
View 1 Replies
View Related