By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Cross domain autofill and submit

P: n/a
Hello,

Im trying to make a "Search Many Sites from One Location".

Heres my problem:
I have a form on my page which allows the user to enter
a search term and select which site he would like the results from.

(the sites dont allow URL pasting) the sites are library catalogues.

heres my idea, can this be done?:
User enters search term, selects site they want results from and
enters submit.

This takes user to a framed page with frame1 being library catalogue.
now either the frameset or frame 2 does this
at timed interval gets the variable that was submited from search term
entered
and uses something like this bookmarklet
javascript:function ROIoiW(){var
i=0,j,A='anonymous',D,E,F=document.forms;while(i<F .length){E=F[i].elements;for(j=0;j<E.length;j++){D=E[j];if(D.type=='text'){D.value=(D.name.toUpperCase(). indexOf('MAIL')!=-1)?A**@example.com':A}}i++}}ROIoiW();void(null)

and something to fill in the search term and press submit in frame1

Aug 29 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Br**************@gmail.com said the following on 8/28/2006 8:14 PM:
Hello,

Im trying to make a "Search Many Sites from One Location".

Heres my problem:
I have a form on my page which allows the user to enter
a search term and select which site he would like the results from.

(the sites dont allow URL pasting) the sites are library catalogues.

heres my idea, can this be done?:
Not in a default security environment.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 29 '06 #2

P: n/a

Dear Randy,
can Javascript prompt the user to change Internet Explorers
security options.

Aug 29 '06 #3

P: n/a
Br**************@gmail.com wrote:
Dear Randy,
can Javascript prompt the user to change Internet Explorers
security options.
Yes, but it's much better to give them a link to a page with detailed
instructions - most browsers don't let you read an alert and modify
options at the same time. You might also want to tell them why
cross-site scripting is prevented by default.

How do you know they are using IE? How many users will carry out your
request?
--
Rob

Aug 29 '06 #4

P: n/a
RobG said the following on 8/28/2006 9:43 PM:
Br**************@gmail.com wrote:
>Dear Randy,
can Javascript prompt the user to change Internet Explorers
security options.

Yes, but it's much better to give them a link to a page with detailed
instructions - most browsers don't let you read an alert and modify
options at the same time.
None of mine do :)
You might also want to tell them why cross-site scripting is prevented by default.
Or the pitfalls of leaving it enabled after they leave the site.
How do you know they are using IE?
<!--[if gte IE 4]>
<script type="text/javascript">
alert('Its IE in some form or another')
</script>
<![endif]-->

Until other browsers mimic the IE conditionals......
And of course, the IE engines that are wrapped. AOL's browser doesn't
display that alert even though AOL uses IE as an embedded browser.
How many users will carry out your request?
Very true :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 29 '06 #5

P: n/a
All users of our site so far have been using IE.
okay so if I make a screen that instructs them on how to
change their security.

still how do I go about doing it?
RobG wrote:
Br**************@gmail.com wrote:
Dear Randy,
can Javascript prompt the user to change Internet Explorers
security options.

Yes, but it's much better to give them a link to a page with detailed
instructions - most browsers don't let you read an alert and modify
options at the same time. You might also want to tell them why
cross-site scripting is prevented by default.

How do you know they are using IE? How many users will carry out your
request?
--
Rob
Aug 29 '06 #6

P: n/a

Br**************@gmail.com wrote:
All users of our site so far have been using IE.
You don't know that for sure. Even if it's true (and it may be), it
may not always be that way. If you believe the browser statistics that
are published by some sites (and many here are very sceptical of such
numbers) IE represents maybe 70 to 90% of web surfers.

It may be that your site is unfriendly to other browsers so visitors
just leave. In any case, you seem to be missing 10 to 30% of potential
visitors, maybe more.

Numbers from site-to-site vary greatly - w3schools puts IE useage at
about 60%, Ars Technica (which seems to be a US site) reported IE usage
among their visitors at 30% in November 2005.

<URL: http://www.w3schools.com/browsers/browsers_stats.asp >
<URL: http://arstechnica.com/news.ars/post/20051103-5525.html >

okay so if I make a screen that instructs them on how to
change their security.
still how do I go about doing it?
Please don't top-post, interleave replies between trimmed quotes.

If you aren't already familiar with the pros and cons of enabling
cross-domain scripting in a browser, then you need much more
information that I (and probably anyone else here) is prepared to
provide.

Your question is really a browser security question, not a JavaScript
question and as such is off-topic here. That doesn't mean it won't be
answered, but that you will probably get better answers in a forum
where such questions are on-topic.

--
Rob

Aug 29 '06 #7

P: n/a
JRS: In article <n5******************************@comcast.com>, dated
Mon, 28 Aug 2006 22:46:26 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.composted :
>
<!--[if gte IE 4]>
<script type="text/javascript">
alert('Its IE in some form or another')
</script>
<![endif]-->
It looks as if that should alert in IE 4. For me, it does not.
Missing apostrophe.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Aug 30 '06 #8

P: n/a
Dr John Stockton said the following on 8/30/2006 11:26 AM:
JRS: In article <n5******************************@comcast.com>, dated
Mon, 28 Aug 2006 22:46:26 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.composted :
><!--[if gte IE 4]>
<script type="text/javascript">
alert('Its IE in some form or another')
</script>
<![endif]-->

It looks as if that should alert in IE 4. For me, it does not.
Missing apostrophe.
According to MSDN, IE4 doesn't support the conditional comments.

<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/ccomment_ovw.asp>

It is considered a "downlevel browser" :\

As for the apostrophe, it's irrelevant anyway.

<script type="text/javascript">
var showSecondAlert = true;
</script>
<!--[if gte IE 5]>
<script type="text/javascript">
alert("It's IE5+ in some form or another along with JRS' apostrophe")
showSecondAlert = false;
</script>
<![endif]-->
<script type="text/javascript">
if (showSecondAlert){
var alertMessage = "Either you are using a non-IE browser or "
alertMessage += "your IE doesn't support conditional comments (IE4)."
alert(alertMessage)
}
</script>
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 30 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.