Programming :: Mechanize Alternatives That Can Detect Javascript Pop-up Windows?
Nov 25, 2010
I am working on scraping a sit e but during the authentication process (a form and user/password then submit) a javascript pop-up window comes up that needs to be pressed.I was planning on using www:mechanize but found out it doesnt do javascript.
View 2 Replies
ADVERTISEMENT
Jun 15, 2011
There is this sample web page: [URL] and it has a clickable link / button that executes a JavaScript function: (Right-Click and Copy Shortcut would give this piece of code)
Code:
javascript:__doPostBack('lbtnUpdateStatus','')
whereas the source code for the link / button is as follows:
Code:
<a id="lbtnUpdateStatus" href="javascript:__doPostBack('lbtnUpdateStatus','')">
I want to automate the above function / link along with the said URL so that I won't have to open the webpage and click the button / link. I want a single URL hitting which we won't need to do the extra effort of "clicking the link / button" that executes the JavaScript function given above. I can't automate this task in the source webpage itself because that has to be there as it is for the users who access the webpage. How to achieve it?
I got some useful information here: [URL] but I want to call a javascript function along with a URL such as this:
Code:
[URL] javascript:alert("OKAY")
but the above line of code won't work.
View 9 Replies
View Related
Jun 28, 2011
Check out the frontpage of mail.com - how do I do the scrolling images in Javascript, like it's doing?
View 4 Replies
View Related
Jan 11, 2011
I went to [URL] the other day, and I'm really impressed with the way, when you click on domain, it adds it to the cart WITHOUT A REFRESH. But what I really want to know is - how does it do the slick little effect when you click "Add to basket", when it "appears" on the right hand side?
View 4 Replies
View Related
Feb 25, 2011
I have some variables that are loaded from mysql - in mysql, the line breaks are not indicated by ' or '<br>' or anything -they are just line breaks. the variable is loaded into javascript and then inserted into a <pre> element. the line breaks are not showing up.
pre1 = pre1.replace(/>/g,">"); - this works well, naturally. but how do i get those line breaks to show up as line breaks in a browser?
I've tried many variations of something like:
View 1 Replies
View Related
May 31, 2011
Lets say I have a site "Website1.com"
On that site I want to run a little javascript that verifies that the site was accessed as "Website1.com" and not "dev-Website1.com"
If it was accessed correctly, nothing happens. If it was accessed incorrectly, it displays an error saying "You are trying to access this site incorrectly."
What is the simplest way to accomplish this?
View 1 Replies
View Related
Nov 13, 2010
I am using window.onbeforeunload to keep people from accidentally leaving. I was hoping to intercept this event, run my own dialog box and load another page that closes the window, or of course, cancel.
I'm needing this because my site is a single page and I can't figure out how long people are visiting for, if I could load an exit page, then I can figure this out.
View 6 Replies
View Related
Dec 3, 2010
var param = function() { <whatever> } ;What exactly does the above MEAN, and why have they included this in the language this way?
View 6 Replies
View Related
Dec 9, 2010
In my book, this is an example of a recursive algorithm:
var reverseArray = function(x,indx,str) {
return indx == 0 ? str : reverseArray(x,--indx,(str+= " " + x[indx])) ;; }
var arr = new Array('apple','orange','peach','lime');
var str = reverseArray(arr,arr.length,"");
alert(str) ;
I'm trying to understand it, I'm stuck at the (str+= " " + x[indx])) part - that part of the function definition expects an ARGUMENT, am I right? What's being passed to it is a bit of PROGRAM, the str+= stuff. So - how is it working?
View 7 Replies
View Related
May 23, 2011
When someone is speaking into the mic, I'd like a "level meter" such as the one that comes with gnome sound recorder, that flashes up and down when a sound is made or somebody talks.This will be done in Javascript, using the brand new "Rainbow API", i.e. inside the browser.I know nothing about audio programming, so - where would I get *started* with something like this? Could anyone tell me at least WHAT to Google?
View 3 Replies
View Related
Feb 4, 2010
I'm loading an XML file stored in a tiny web server (based on lwip). This web server is not very cooperative and is not marking the http content-type as "text/xml". As result, Firefox is not recognizing the file as xml (IE does) so I can't use DOM methods for parsing the xml file. overrideMimeType("text/xml") should help me avoid this problem but, even having overrided the mymetype, the content-type received is still "text/plain". This is a portion of my JavaScript code:
Code:
var xmlObj;
// loadXMLdata is called from the html file
function loadXMLdata() {
var dataFile = window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1) + "config/myfile.xml";
if (window.XMLHttpRequest) {
xmlObj = new XMLHttpRequest();
// This should override the mimetype...
if (xmlObj.overrideMimeType)
xmlObj.overrideMimeType("text/xml");
xmlObj.onreadystatechange = fillXMLdata;
xmlObj.open("GET", dataFile, true);
xmlObj.send("");
} else {
alert("Your browser can not handle this script");
return; } }
// fillXMLdata is called from loadXMLdata once the xml object is ready
function fillXMLdata() {
if (xmlObj.readyState == 4) {
// Here Content-Type shows again "text/plain"
alert(xmlObj.getAllResponseHeaders());
var xmlDoc = xmlObj.responseXML.documentElement;
// And here section is null
var section = xmlDoc.getElementsByTagName("section")[0]; } }
The xml is quite simple:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<section>
<item>1</item>
<item>2</item>
</section>
View 1 Replies
View Related
Jun 2, 2010
im trying to learn javascript. so i choose to start out making a image slideshow banner that auto scrolls on load no special buttons. so since i had no idea were to start i found code that was free to use commercial and non commercial and ill be able to change it. heres that code:
Code:
var SLIDETIMER = 3;
var SLIDESPEED = 3;
[code]....
View 2 Replies
View Related
Jan 2, 2010
I'm working with javascript and trying to replace all instances of a Roman character in a string with nothing. How do I assign var reg to all Roman characters? In UTF8, capital letter A is U0041 and at the other end, small z is UFF5A.
So, I'd like to do something like:
var reg = u0041 - UFF5A;
str1 = str.replace(reg, '');
I think you get the idea. I have no idea if that can be done. The idea is to take this string (for example): str = make a door-to-door[house-to-house] visit / ring every doorbell." And take out all the Roman characters and define it as str1. And then take out all the Korean characters (u1100-uFFDC) and define it as str2. In fact, a WAY more useful thing to do would be to replace the instance of this: [u1100-uFFDC]+" "+[u0041-UFF5A] with [u1100-uFFDC]+","+[u0041-UFF5A] so that the output would be a .csv file.
View 5 Replies
View Related
Jan 14, 2011
I can play a sound on my local machine using the following code, but when I upload to a server the same code it does not play. I cannot work out why, the link below gives the code. The multi channel code is here:
[URL]
Code:
<audio id="multiaudio1" src="audio/flute_c_long_01.wav" preload="auto"></audio>
<audio id="multiaudio2" src="audio/piano_chord.wav" preload="auto"></audio>
<audio id="multiaudio3" src="audio/synth_vox.wav" preload="auto"></audio>
<audio id="multiaudio4" src="audio/shimmer.wav" preload="auto"></audio>
[Code].....
View 4 Replies
View Related
Jul 30, 2011
I'm looking for javascript tutorials or books that meets the following criteria:
1. Very thorough: Starts with the most fundamental concepts and progresses logically from basic to advanced concepts, without skipping over important ideas for the sake of expediency.
2. Lots of small practice exercises that parallel the concepts and syntax being learned.
I've looked at a lot of tutorials, but they all tend to be lacking in one of these areas or the other.
View 1 Replies
View Related
Jun 18, 2010
How can I validate an IPv6 address through javascript before using the IPv6 value in my cgi script?
View 2 Replies
View Related
Aug 19, 2009
I've been looking for alternatives to Active Directory with Centos mainly SAMBA and OpenLDAP. I have worked with SAMBA and I know I can create a PDC and make clients join a domain but how about enforcing Group Policy?... is this possible with SAMBA or OpenLDAP/LDAP?
View 2 Replies
View Related
Mar 2, 2010
I need MatLab for a course at the university, but it's not an open source software as all of you know, so I wanted to know if there are valid freeware alternatives. I was told to use Octave or Scilab if I didn't want to buy the license and so I would like to know what's better in terms of MatLab compatibility and ease of use, if there are any other (and maybe better) alternatives and also if there are free Simulink-like programs.
View 8 Replies
View Related
Jun 10, 2011
I am trying to set up a webpager that contains a background of the skylouds uperimposedin the center will be an image of an airplane with a transparent background.I want the sky to scroll continuously to the left behind the airplane. I am having problems with the background not being visible, not moving as expected, the airplane not being visible, and just disappointment in general.I think the background of a div will not be visible if there are no internal contents because it will be sized to zero. So I introduced another transparent image to force the size of the main div. Still no joy.Here is my code. Note that I don't have my timers set up yet, just a button to test background movement.
Code:
<!DOCTYPE html>
<html>
[code]...
View 2 Replies
View Related
Mar 29, 2010
Is there some way to access HTML elements via javascript through some internal ID?
For instance, given a form like:
Code:
<form name="myForm">
<input type="text" />
<input type="text" />
[Code]....
I think I've seen some way to do this before but I'm not certain
View 4 Replies
View Related
Jun 6, 2011
this should have been a simple task, but for some reason one of my rollovers plain old isn't workingmy html sheet
Code:
<div style="background:#F5F5E9 url('/sites/all/themes/flossmoore1/images/bricks250.png');padding:1px;padding-
[code]....
View 1 Replies
View Related
Jun 22, 2010
I have this regular expression
Code:
(@description ").*(";)
I want to match anything in between the quotes its working fine in JavaScript but its not working in my python program:
Code:
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
import re
[code]....
View 3 Replies
View Related
Sep 1, 2009
I need a textbrowser with Javascript Support. I have compiled the elinks stable 0.11x and the unstable 0.12x version mit JavaScript Support (js moz dev). Both browsers can be started and showed websites normaly. But no javascript, even simple tests like [URL] failed. I started elink with ./elink and typed then the url.
View 4 Replies
View Related
May 3, 2011
When working in an XP VirtualBox I can't use Alt-Tab to switch to my Linux Apps as VirtualBox captures the keys for Windows. So I tended to make a lot of use on the Application list on the old System Tray/Taskbar. I could click on the application's entry in the taskbar and that application would come up. When I needed to return to the Windows App, I clicked again and the application would then minimise so I can see the Windows app. Also I have been using the SUPER button in conjunction with 'E' to raise the Home Directory (just to keep it consistent with Windows).
View 5 Replies
View Related
Jun 24, 2011
All I want to do is fade some text in and out via the opacity attribute, and change the text when it hits zero. My script changes the text on time, but ignores the formatting effects. I'm not worried at this stage about the else statement in the startFadeEffect() function. I just want the fade effect to work here the way it should.
[Code]...
View 14 Replies
View Related
Jan 17, 2010
As the Title states, "update-grub" does not detect the windows xp partition on /media/sda1. And, when I attempt to mount it from teminal nothing happens, and from nautilus I receive the following error: "Error mounting: mount exited with exit code 2:
mount: only root can mount /dev/sda1 on /media/sda1" I am root.
View 9 Replies
View Related
Feb 23, 2010
I'd like to have a dual-boot system with WIN7 and Ubuntu. I already have Windows 7 installed. I tried the 9.10 installation but the partitioner says i don't have any Operating Systems installed. I read a few threads about this type of issue and i didn't find any solution. Then i found a discussion saying that there is a problem with GRUB2 in 9.10 and that the problem is not present in 9.04. Then i tried the installation with 9.04 but got exactly the same problem: the partitioner does not detect Windows 7. Basically i have this system:
- Windows 7 Professional x64
- 1 TB HDD with 4 partitions with 100Gb each (NTFS)
- ~600 GB unpartitioned free space
- Processor Intel Core 2 Quad Q8200
- ASUS P5Q MOBO
- ATI Radeon HD 4550
I tried both the x32 (i386) and x64 (AMD) versions of 9.10 and the x64 version of 9.04. I don't have the WIN7 partition that some installations seem to have, at least i don't see it under Disk Management (Computer Management).
View 9 Replies
View Related
Oct 10, 2010
I've searched quite a bit and cannot find a solution to why using update-grub cannot detect my windows 7 partition Here is a log of the bootinfo script(hopefully it pastes correctly...)
Code:
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.
[code].....
View 3 Replies
View Related
Oct 8, 2010
I have been trying to code a program in C++ that must check for the correct syntax in order to operate. It must find ", " within the string, but I don't know why the compiler won't recognizes spaces.
Code:
#include <iostream>
#include <stdio.h>
#include <string>
[Code]....
So the user must input "<name>, <interest>" with the ", " (comma and space) but even if you respect the syntax the compiler will skip to the else condition. I don't know why, but if I put any other condition like ",s" it will work, but not with spaces.
View 7 Replies
View Related
Apr 13, 2011
I am working on a project that takes multiple blocks of memory that are no more than 1500 bytes in side and tries to compress them. Currently I just compress them and compare the old length to the new length. If the new length is smaller it copies the compressed data into the original datas memory space.The problem I have is when lots of these blocks of memory do not compress well its huge amounts of wasted CPU.
View 6 Replies
View Related