473,385 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Combining user script with an existing web page : cross-browser ways?

Is there a way to make a (cross-browser) javascript function that will
open an existing webpage (for example, www.google.com) in a new window
(or in some part of _self) and then load a specified user script?
like this way:
openWithUserScript(
'http://www.google.com',
'http://www.my_homepage.com/my_script.js'
);

Aug 24 '06 #1
2 1405
HopfZ wrote:
Is there a way to make a (cross-browser) javascript function that will
open an existing webpage (for example, www.google.com) in a new window
(or in some part of _self) and then load a specified user script?
like this way:
openWithUserScript(
'http://www.google.com',
'http://www.my_homepage.com/my_script.js'
);
Tell us more about what you are trying to accomplish this. Is this intended to
be some sort of phishing attack? By injecting your script into someone else's
page, the user believes that the page is safe to interact with, but your script
captures their secrets.
Aug 24 '06 #2
Douglas Crockford wrote:
HopfZ wrote:
Is there a way to make a (cross-browser) javascript function that will
open an existing webpage (for example, www.google.com) in a new window
(or in some part of _self) and then load a specified user script?
like this way:
openWithUserScript(
'http://www.google.com',
'http://www.my_homepage.com/my_script.js'
);

Tell us more about what you are trying to accomplish this. Is this intended to
be some sort of phishing attack? By injecting your script into someone else's
page, the user believes that the page is safe to interact with, but your script
captures their secrets.
There are webpages that provide online javascript interpreter.
There are also webpages that provide a textarea element and some
buttons that do some simple text processing:
regex test,
finding all urls in the text then linkifying them all,
taking the multiline bookmarklet code in the text then creating a
bookmarklet link.
And I want to combine a javascript interpreter with a textarea element
and some convenience functions for simple text processing. Then when
you use the combined page as a javascript interpreter, you can assign a
long multiline text into a variable easily by running the code like var
a = theTextAreaElement.value;. When you use it as an online text
processing page, you can either press the provided buttons with fixed
functions or run javascript code to do more flexible things with the
text.
Currently I know three ways to accomplish such combination:
1. make both interpreter part and processing part with my own hand.
2. make a bookmarklet that will add processing part to a specific
online javascript interpreter page.
3. Greasemonkey. only for Firefox.
I might do the second way because I am too lazy to construct javascript
interpreter myself. But then if somebody need to use the combination,
she have to drag the bookmarklet to the browser toolbar and also click
the bookmarklet. She wouldn't have to do that if I did the first way.
If openWithUserScript is possible, both of she and I can enjoy lazyness.

Aug 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: indie | last post by:
how to make a user management in php, i mean that i want to limit the user access to my page. the script will not allow 2 user have an access to my page at the same time. the script only allow 1...
27
by: Mxsmanic | last post by:
How can I combine SSI, CGI, and PHP in Apache 2.x? I keep reading that this can be done, but I haven't found any examples of the actual configuration required to do it. What I want to do is: ...
2
by: Brian | last post by:
Hi All, Can someone please point me in the right direction I am having problems combining JS and ASP. What I am trying to do is store in a database using ASP the referring page of my visitors. ...
13
by: dawatson833 | last post by:
I have several stored procedures with parameters that are defined with user defined data types. The time it takes to run the procedures can take 10 - 50 seconds depending on the procedure. If I...
1
by: Kjell Kristiansson | last post by:
In developing a solution I ran into a problem where I have found no acceptable solution. The problem is combining users with anonymous login and users logged in to a domain in the same .aspx...
2
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a...
8
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
11
by: Web Search Store | last post by:
Hello, I set up a web page with 2 user controls. In classic asp, the first one did all the declarations, and the second one used the values, and could reset it. In ASP.Net so far I can't...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.