/    Sign up×
Community /Pin to ProfileBookmark

search certain websites without having to use specific search engines?

Hi experts,

is it possible via Javascript to search certain websites with certain keywords without having to use specific search engines?

example search only the following:

  • 1. [url]www.yyy.com[/url]

  • 2. [url]www.aaa.com[/url]

  • 3. [url]www.zzz.com[/url]
  • for the keyword “Laminat” and open the sites accordingly.

    thx

    to post a comment
    JavaScript

    5 Comments(s)

    Copy linkTweet thisAlerts:
    @A1ien51Aug 27.2009 — What does it mean without having to use specific search engines?

    Eric
    Copy linkTweet thisAlerts:
    @dododidiauthorAug 27.2009 — well in this case the predefined sites could be automatically loaded into one page with e.g, iframes.

    then a Javascript perhaps search those loaded iframe-pages onload for the wanted keyword e.g "Laminat" .

    this would simply save a lot of time instead of having to open each page individually every time and manually searching
    Copy linkTweet thisAlerts:
    @dododidiauthorAug 28.2009 — it seems nobody understands what I am attempting to do, so I have just tried the following test example.

    I am trying to search the loaded iframe onload:

    http://www.data-affiliates.com/DL2345tls2345/iframe.html

    [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>test</title>
    <!--link rel="stylesheet" href="mainchessvid.css" type="text/css" media="screen" /-->
    <link rel="stylesheet" href="vid61.css" type="text/css" media="screen" />
    <!--script type="text/javascript" src="vid61.js"></script-->

    [COLOR="Blue"]<script type="text/javascript" >
    var str2find = "L~am~in~at"
    // Note: str2find must be munged initially with ~ characters as otherwise the string will always be found!
    str2find = str2find.replace(/~/g,""); // unmunge
    window.onload=function(){
    var str = document.getElementsByTagName('iframe')[0].innerHTML;
    //alert (str); // view it!
    str = str.toLowerCase(); // to make case insensitive
    str2find=str2find.toLowerCase(); // to make case insensitive
    var a = str.indexOf(str2find);
    if (a >= 0) {
    alert ("The HTML contains the string " + str2find);
    }
    else {
    alert ("Sorry - this sequence of characters was not found.");
    }
    }</script>[/COLOR]
    </head>

    <body>
    <!-- /BEGIN-container -->
    <div id="container">
    <!-- /header -->
    <div id="header">
    </div>
    <!-- /LEFT-sidebar -->
    <div id="sidebar" class="nav">
    </div>

    <!-- /RIGHT-sidebar -->
    <div id="sidebar2">
    </div>
    <!-- /BEGIN-IFRAME1 -->
    <div id="ts-1">

    [COLOR="blue"]<iframe id="Iframe1" name="Iframe1" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0"
    width="596" scrolling="yes" height="596" src="http://www.data-affiliates.com/DL2345tls2345/testing.html">
    </iframe>[/COLOR]
    </div>
    <!-- /END-IFRAME1 -->


    </div>
    <!-- /END-container -->

    </body>
    </html>[/CODE]


    any suggestions would be most appreciated.?

    thx
    Copy linkTweet thisAlerts:
    @A1ien51Aug 28.2009 — You can not interact with other domains with JavaScript since JavaScript has a same domain policy. If you were to try to do that with any other page [example.com, google.com, msn.com, etc] you would get a security error.

    Eric
    Copy linkTweet thisAlerts:
    @dododidiauthorAug 28.2009 — I thought that but thx anyway eric
    ×

    Success!

    Help @dododidi spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...