Capturing Src Output To A Variable?
Sep 10, 2011
I am new to this forum and also not a javascript coder. That said, I have a webpage that uses a freeware compiled javascript that displays the number of users current on line.
It works fine. But I would like to capture the output value as a variable that could then be used later. The code below displays the current number of users.
Code:
<script language="JavaScript" src="/cgi-bin/online/online.cgi?output=javascript"></script>
View 8 Replies
ADVERTISEMENT
Jul 20, 2005
I'm sure you all have seen how using the src argument in a script tag
is essentially the same as including the body of the script within
your page. For example:
<script type="text/javascript"
src="http://somepage.com/somead/show_ads.js">
</script>
Is there a way to capture the html output of that script and save it
to a variable or text file so that I can use a language like php to
parse it and look for certain words or phrases?
For instance, this particular url executes some javascript code which
produces an iframe on my page, but view source only displays the
script tag. Using innerHTML I can get the iframe code to print in
another browser window, but I would prefer the iframe html be save to
a variable or text file so that I can write a script to parse it on
the fly.
View 1 Replies
View Related
Aug 7, 2010
I have a for loop that generates a .append line for each item in an array. This loop is writing out a deli order, where each item on the array is an item on the order. One of the things in the appended line is a delete button that lets the user delete that particular item in the array.
The .append looks like this:
The thing I'm looking for some explanation on is the dlt(' + i + '). dlt() is the delete function and it needs to receive the number of the item on the order array that this line is being generated for. If I code dlt(i) the function is passed the value of i at the time the delete button is clicked, which is after the entire order has been displayed and so is one plus the number of the last item on the array. Someone from this forum suggested the dlt(' + i + ') form to capture the value of i at the time the line was being generated, but I don't really understand why this works.
Could someone who does understand this perhaps write a few lines about why this captures the i that I want? I certainly wouldn't have thought to write this on my own.
View 2 Replies
View Related
Jul 16, 2011
Codes for Dropdown menu based on radio buttons selection needed!
I need urgent help with this:
I need codes for a dropdown menu that is altered by radio buttons.
I want to insert the value selected from the dropdown menu into a table.
View 1 Replies
View Related
Nov 3, 2010
I'm working on a project in which I parse the XML and I get the element names.
So far everything is ok.
Also, I would get a variable increment that I create in the function and I want to find out of it.
Unfortunately, I can not recover.
Here is an example of my script:
// start
// "i" is my increment variable
var i = 0;
$(this).find('foo').each(function(i){ // run correctly x time
i = i++;
[Code]....
How do I find my variable "i" to the output of my loop?
View 2 Replies
View Related
Nov 26, 2011
Here is a bit of a conundrum, it you have an interval timer and it is interrupted say by a clearInterval call, how can you tell how far along the interval the timer was when it was canceled? When I look at an object that is an setInterval() event timer, I get -1 as the output when I valueOf() the variable. What I am wondering is if for example the following
Code:
var thisIntervalTimer = setInterval("onceAminute()",60000); the interval of one minute passes between updates, apart from setting up a tracking variable to track milliseconds, does the thisIntervalTimer possess any user accessible values like thisIntervalTimer.getMilliseconds; to return the current 'tick' value of the interval timer attached to the variable thisIntervalTimer. What I would be interested in is if any method exists to access any properties of this object, they must exist in some form as how would the browser know what event timer to update or trigger.
View 2 Replies
View Related
Nov 8, 2010
When a person signs up for my website it first adds them to my external email list and then to my MySQL database.In order to do this you have to pass the information of the form to the next page where you can "display" it. Nothing except this display function seems to work.So what I am trying to do is take what is outputted by this display button and store it in a javascript variable. Then transfer this variable to a form which will auto submit and start the PHP registration pulling the output of the script, right now I can either get an undefined or the entire HTML code. Is there another option?Here is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"
>
[code]....
View 11 Replies
View Related
Jul 23, 2005
Is there any way to capture the action Ctrl+N (whether it in a hidden
button or keyword - doesn't matter) in html, javascript or php?
View 6 Replies
View Related
Nov 24, 2005
I'm trying to make my WYSIWYG editor cross-bowser compatible. To do this I'm contemplating a way to capture keystrokes, but have no clue to go about it.
For example:
If the user presses enter, I want to capture the keystroke and return a <br> tag or if the user presses ctrl + B, I want it to return a <strong> tag.
View 4 Replies
View Related
Feb 20, 2009
my company has a bunch of web pages on which they want to record every DOM event(mouse movement, clicks etc), these pages were written in past and now with minimal editing I need to add listener to capture these events. way to do this (may be addition of eventlistener at Body tag to capture all bubbled up events, but i am not sure if it will work when stopPropagation method is called by some eventlistener in the chain). I am looking for a universal listener kind of thing that can be easily integrated with my pages.
View 1 Replies
View Related
Jun 9, 2010
I have a very simple jquery RTE I've built. When adding a link I currently do this ( $.iframeread is just a function to pick the right way to "find" the iframe content for the browser being used)
[Code]....
I can obviously create this and show() it when I need to - what I don't know how to do is pass $('select[name="type"]').val() + $('input[name="link"]').val() back to the orginal function - ie how do I capture $link
[Code]...
View 2 Replies
View Related
Oct 5, 2009
My client has a training site that is associated with 4 different domains. If a user navigates away from one of the domains to another site (for instance www.google.com) they want to display a message and ask them if they want to leave the training site. my understanding of the window.location.href is that it will capture what is typed into the address bar until the request is submitted to the server but by then they are leaving the site. below is my code on the onbeforeunload event. conceptually: i want to capture the URL, compare the hostname and if the host name is one of the 4 domains then allow them to proceed, if it is not then as them if they want to leave the site. if they click ok allow them to move forward, if the click cancel then reload the page. I know this is considered bad design and i have expressed this but this how they want the site to behave.
<script type="text/javascript">
function SiteCheck()
{
var strCurrentURL = window.location.href;
var strNewHostName = strCurrentURL.split("/");
//
for(i = 0; i < strNewHostName.length; i++)
{
[Code]....
View 4 Replies
View Related
Apr 15, 2010
I am using a third party shopping cart service written in php. I don't have access to the php code so I decided to use javascript to write a cookie. What I'm trying to do is have the cookie capture the referring URL and then keep it for a day and have it follow where ever the visitor goes in the shopping cart. Then when they check out, the referring URL will populate a form field and be returned as part of the form results. This way I can track where my visitors come from. My code is below and I'm adding it to the file designated as the head section. (The files I have access to must use some form of include but I can't use php in them - just html and javascript. I've tried.)
I have an alert in the code that suggests something to do as well as set the cookie. The alert comes up and the cookie is set but when you go to another page, the alert comes up again and another cookie is set. I just need to have it set once so when they fill out the order form, I'll know where they came from.
<SCRIPT LANGUAGE="JavaScript">
cookie_name = "dataCookie";
var referred;
[code]....
In the body I am reading it with a form field of
<SCRIPT LANGUAGE="javascript">
document.write("<FORM>")
document.write("Originally Referred by:")
[code]....
View 1 Replies
View Related
Oct 5, 2009
My client has a training site that is associated with 4 different domains. If a user navigates away from one of the domains to another site (for instance google or msn) they want to display a message and ask them if they want meant to leave the training site. my understanding of the window.location.href is that it will not capture what is typed into the address bar until the request is submitted to the server but by then they are leaving the site. below is my code on the onbeforeunload event. concept: i want to capture the URL, compare the hostname and if the host name is one of the 4 domains then allow them to proceed if it is not then as them if they want to leave the site. if they click ok allow them to move forward, if the click cancel then reload the page. I know this is considered bad design and i have expressed this but this how they want the site to behave.
<script type="text/javascript">
function SiteCheck()
{
var strCurrentURL = window.location.href;
var strNewHostName = strCurrentURL.split("/");
//
for(i = 0; i < strNewHostName.length; i++)
{
alert(i + ' ' + strNewHostName[i]);
}
[Code]...
View 1 Replies
View Related
Aug 8, 2005
I've got a form that is enabling/disabling other fields based upon radio selections. I've got it all working, except with the form reset button. My "refresh" routine just iterates through the radio box to check which item is selected based upon e[i].checked state and enables/disables accordingly. Unfortunately it seems the reset event fires before the actual state of e[i] has been reset and my form enabing/disabling gets out of sync.
var btn = document.getElementById('formData');
formValidation.addEvent(btn, 'reset', formValidation.refreshUI, false);
refreshUI: function() {
var e = document.getElementsByTagName('input');
for (var i=0; i<e.length; i++) {
if (e[i].type == 'radio' && e[i].name == 'ipType' && e[i].id == 'ipStatic' && e[i].checked == true) {
document.getElementById('ipHost').disabled = false;
document.getElementById('ipAddress').disabled = false;
document.getElementById('ipMask').disabled = false;
document.getElementById('ipGateway').disabled = false;
break;
}
else if (e[i].type == 'radio' && e[i].name == 'ipType' && e[i].id == 'ipStatic' && e[i].checked == false) {
document.getElementById('ipHost').disabled = false;
document.getElementById('ipAddress').disabled = true;
document.getElementById('ipMask').disabled = true;
document.getElementById('ipGateway').disabled = false;
break;
}
}
}
View 1 Replies
View Related
Dec 15, 2007
how to capture onkeyup event from an editable iframe in firefox?
View 3 Replies
View Related
Jul 20, 2005
I need to capture the following events in IE 5+ and Netscape 6:
- Enter new address in URL window and click "GO"
- Select a favorite
- Click "Home" button
- Click "Back" or "Forward" button
Basically, I have to see if someone is navigating away from our page
under very specific circumstances, and pop-up a window. I need more
granularity than the unload and onclose events will give me.
View 3 Replies
View Related
Aug 23, 2009
My first question folks. I have recently joined a web based video conference which allow people to join as a guest (no need to create account). This conference's interface and function is written in javascript as an applet.
To cut the long story short, is it possible to capture this applet and see the conference (without having to join the conference)? What happen at the moment is people wont be able to see the conference without join in and therefore take one slot out of 7 seats if you like. When all slots are taken people can not see the event. I was wondering if there is a way to capture this event using other javascript.
I have all the scripts required to make this conference running, i know the logic of how javascript works but i dont know what is what in detail.
View 12 Replies
View Related
Dec 2, 2004
I have successfully converted my .tiff file to a text file. This was a major step. My issue now that i am facing is "capturing" pertinent data. I am attempting to do this by running a JavaScript to create an HTML file from the .txt file. I am having trouble figuring out how I am going to pass the argument of a .txt file and embedding it into the HTML page.
View 9 Replies
View Related
Jul 10, 2009
I need to capture the delete key event onclick on DIV. I wrote the below code using jQuery.
$("#DIVID").keydown(function(event){ // delete key works with IE
if(event.keyCode == 46)
{
// delete code goes here
}
This is working fine in IE but not on Mozilla, Safari.
View 2 Replies
View Related
Nov 30, 2010
I have 2 divs, one on top of the other. The top div merely holds some overlay imagery ( such as a glare ). The lower div has a menu in it, and thus needs mouseovers, etc. However, the top div is preventing the lower div from getting mouseevents.
View 6 Replies
View Related
Sep 12, 2011
I just want to understand the concept of event bubbling, capturing and delegation. I have read a lot about them but still unable to fully understand them (capturing, bubbling, delegation).
View 1 Replies
View Related
Feb 2, 2010
I'm trying to do a form validation...however, i can't get the submit event to work. So I tried to alert a message when the form submits. But the form submits without going through the submit function.
Heres the code
embeded in validateContactForm.js
Code JavaScript:
$('form').submit(function(){
alert('dfd');
return false;
[Code].....
View 5 Replies
View Related
Oct 26, 2008
How can you capture a back-button move that points to an anchor.. So basically, the user enters the page, clicks on an anchor which brings him to another part of the page, clicks the back button. Now ideally when he hits the back button, I want to be able to call a javascript function from there.
Page loads --> user clicks anchor (#test) --> calls javascript function using onClick --> user presses back button --> ?? capture the back button move and call javascript function ??
View 5 Replies
View Related
May 7, 2010
Probably covering well trodden ground here but so far I haven't found any reliable solution and "it can't be done" seems crazy. Here goes:I have some Flash and non-flash banners that are to be embedded into my page - all managed by a simple CMS. The Flash movies are not created by me as they are for 3rd Party advertisors, and I do not want to be doing any Flash programming myself as it's not my thing and I don't have the resource to do it. As with the JPEG/GIF files - I just want to be given the file and then embed it.
What I want to do is produce some MI based upon when the various banners are clicked - things like how many clicks and who clicked them (users are logged into the web site so I can track them). Simple enough for JPEG/GIF banners capturing the onclick event but for Flash it seems that the Flash movie prevents (or overrides) the onclick event from registering.This seems crazy! I want my application logic (in this case logging user activity) to be independant of the media content - especially as I am not in control of the media content.Googling and experimentation shows that for IE I can seemingly use "onfocus" but this is not very satisfactory and of course I need a cross browser solution.This seems like such a simple concept that at the time of specifying the requirements it didn't occur to me that this might not be possible.... but it seems that I may be wrong!
View 3 Replies
View Related
Jan 15, 2010
My background is C++ and C#. Using basic selectors and filters in jQuery is not a problem for me. My problem is finding the right jQuery code to capture a live html page and assign an object which contains all the html text I just captured... then I can use the object to apply basic selector and filter functions to create another page.
View 6 Replies
View Related