I'd like to get contents of a website using JavaScript menu. I need to simulate clicks (or typing javascript:gotoPage("p10"); into a browser) on menu links to be able to move from one page to another.
The website uses a form activated by JS. It's probably not possible to go to another page by entering URL, because there are some hidden fields (something like hash- it's dependent on time and the page #). That's why I have to simulate a browser using user.
Basically the process will look like this:
while (any_content) {
file_get_contents();
clickalink();
}
Can cURL or JSON be used for this task?
If you're using PrototypeJS you could perhaps use the event.simulate library to simulate clicks on links.
https://github.com/kangax/protolicious/blob/master/event.simulate.js
$('link_id').simulate('click');
Related
I have one scenario that in first website I have a link and second website have some jQuery alert.
What I want is that by clicking the link in first website alert will show in second website without reloading any page. Both websites are open in different machines.
Language of websites: PHP
You have 2 options:
Long-polling: Basically, whenever your button is clicked, you change something in the server, e.g you change a column in your database. And all the while, in your second page (the one you want to make the alert), you have a long-lived connection to another server-side file that constantly checks the value of that column in the database, and whenever you detect a change (which reflects the click), you return something to your JQuery (I implemented that using a while loop and the sleep function in PHP.
Websockets, in PHP, this means Ratchet.
For your case, I recommend the first approach, much simpler and easier to implement. I would use websockets for something like instant-messaging.
CONTEXT
I am building an app that loads a third party website within an iframe, through a proxy in order to allow changes to be made to the website. Because of the proxy, I am able to inject JS code into the website, allowing an element selector to be present within it (i.e. something like this: http://jsfiddle.net/rFc8E/)
PROBLEM
My next step is to enable the user to not only select components but to be able to edit them. So, for example, I would be able to select text, type in new text, click save, and then have the selector -> content change values be stored somewhere on my app. This has been accomplished by others, as described here: How does Optimizely & Visual Website Optimizer handle visual DOM editing?.
However, I'm not sure how step 3 is accomplished:
Our user at this point can make changes to the page, like modifying text, swapping out images, or moving elements around. Each change that is made with the editor is encoded as a line of JavaScript that looks something like the following:
$j("img#hplogo").css({"width":254, "height":112});
|__IDENTIFIER__||____________ACTION______________|
Could someone point me in the right direction?
I am loading external website into the webview. On one of its pages, there is a button which shows/hides table. The show/hide action is done via JavaScript.
I have not been able to detect this JavaScript no matter which method I override in WebChromeClient. I can detect JavaScript alert popups, but not this code.
I basically want to know when a user has shown this table to I can offer him additional help filling the table.
Can this be done at all?
Is there a way in Adobe Acrobat to detect if a user is on the last page? What I would like to do is set some document javascript to trigger once they are on the last page. I know how to setup the document javascript in Acrobat, just haven't found any way to detect what page its on. Ideally it would be nice to be able to get the current page and page count and compare, but even if there is a current page variable, I could just hard code the last page. My fallback will be to add a button or checkbox on the last page, but would like to avoid that. Any help would be appreciated. Thanks.
Pages have actions just like fields do, so in your case, you could use the last page's Open event to trigger your Javascript.
To set a page action, open the "Page Thumbnails" navigation pane on the left, right click the page, then add an action as you would to a field. Alternatively, a page action can be set via Javascript. In your case this would look something like this.setPageAction(this.numPages-1, "Open", action);
My website uses the jQuery.validationEngine plugin to validate user forms. I really like the look and feel of the tooltips that pop up (ie. they fade in slowly and disappear when the user clicks on them). Here is an example of the validationEngine in use.
I would like to use the same tooltips to show hints or notifications when the user visits certain pages (for example, "you have a new message, click here to view"). So, they're not actually based on validation, but rather the page itself loading. I'm having trouble figuring out how to call the actual tooltips that the jQuery plugin uses, without having to validate anything.
How can I call the tooltip itself, without validating?
Thanks!
Try the plugin package} {des pack containing 2 plugins for notifications.
1. desNotifiers
2. desToolStip.
3. desWindows.
http://des.delestesoft.com:8080/?go=5