Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: JavaScript: Get info from other web pages  (Read 9405 times)

0 Members and 1 Guest are viewing this topic.

paulinnorway

    Topic Starter


    Rookie
    JavaScript: Get info from other web pages
    « on: October 25, 2006, 12:39:52 PM »
    Hi,

    I'm new to JavaScript and I'm still trying to understand it all. The reason I'm "trying" to learn JavaScript is to make my life easier.

    My problem is as follows.....

    I am starting to sell electrical products locally.
    Go to http://www.cafecom.no/shop/ and click on one of the product icons to see how my site displays things.

    As you can see, the webpage is split into 3 frames:
    - Top frame is the heading
    - Middle frame opens an outside site (the site I shop with: http://www.norek.no)
    - Bottom frame is blank (I want this to diaplay the price of each item, depending on what the middle frame contains).

    As you will notice, the middle frame contains no prices. This is because you need to be logged in as a business to see the prices. Obviously my customers can't be logged in or they would be able to order products without me getting a chance to add my profit to the price!

    I'll give you an example of what I would like to do:
    As the customer browses, I would like JavaScript to "read" the product number from the middle frame. That's all I need, to get the product number from each page.
    Since the format of each page is the same, I was hoping that JavaScript could search for the word "varenummer" (ie. "product number"), and then retrieve the next 6 numbers (which would be the actual product number).

    I'm not sure I've explained myself too well, but I hope you understand what I want.

    Thanks, and hopefully someone can point me in the right direction....or at least tell me if what I'm asking is even possible with JavaScript!  ;D

    unlovedwarrior



      Guru

    • someday this name will be known
    • Thanked: 13
      Re: JavaScript: Get info from other web pages
      « Reply #1 on: October 25, 2006, 04:24:40 PM »
      u might be able to do it with javascript but dunno php or perl might be better lets wait for rob or some one k


      unlovedwarrior

      paulinnorway

        Topic Starter


        Rookie
        Re: JavaScript: Get info from other web pages
        « Reply #2 on: October 26, 2006, 03:12:21 AM »
        Quote
        u might be able to do it with javascript but dunno php or perl might be better lets wait for rob or some one k


        unlovedwarrior
        Thanks for the reply.
        I hope I can do I with JavaScript because I don't want to have to learn another language ;)
        I don't mind if using JavaScript is messier or less efficient......as long as it works.

        unlovedwarrior



          Guru

        • someday this name will be known
        • Thanked: 13
          Re: JavaScript: Get info from other web pages
          « Reply #3 on: October 26, 2006, 08:14:19 AM »
          maybe someone with more scripting knowledge will show up.. cuz im a virus section creature i just get lost sometimes and try to help in the forums i fall into..

          paulinnorway

            Topic Starter


            Rookie
            Re: JavaScript: Get info from other web pages
            « Reply #4 on: October 26, 2006, 08:18:23 AM »
            Quote
            maybe someone with more scripting knowledge will show up.. cuz im a virus section creature i just get lost sometimes and try to help in the forums i fall into..
            Thanks for keeping me company while I'm waiting for the experts to show up ;D

            unlovedwarrior



              Guru

            • someday this name will be known
            • Thanked: 13
              Re: JavaScript: Get info from other web pages
              « Reply #5 on: October 26, 2006, 08:22:53 AM »
              your welcome have you tried the google lord

              paulinnorway

                Topic Starter


                Rookie
                Re: JavaScript: Get info from other web pages
                « Reply #6 on: October 26, 2006, 08:35:18 AM »
                I've tried a few google searches but it's very difficult to think of a phrase that best describes my problem. It's been no help so far.

                unlovedwarrior



                  Guru

                • someday this name will be known
                • Thanked: 13
                  Re: JavaScript: Get info from other web pages
                  « Reply #7 on: October 26, 2006, 08:36:43 AM »
                  try frames and javascript

                  paulinnorway

                    Topic Starter


                    Rookie
                    Re: JavaScript: Get info from other web pages
                    « Reply #8 on: October 26, 2006, 08:45:14 AM »
                    Quote
                    try frames and javascript
                    I'll try that. Thanks.

                    unlovedwarrior



                      Guru

                    • someday this name will be known
                    • Thanked: 13
                      Re: JavaScript: Get info from other web pages
                      « Reply #9 on: October 26, 2006, 08:49:23 AM »
                      just modify the search words

                      soybean



                        Genius
                      • The first soybean ever to learn the computer.
                      • Thanked: 469
                      • Computer: Specs
                      • Experience: Experienced
                      • OS: Windows 10
                      Re: JavaScript: Get info from other web pages
                      « Reply #10 on: October 26, 2006, 11:32:47 AM »
                      Quote
                      As you will notice, the middle frame contains no prices. This is because you need to be logged in as a business to see the prices. Obviously my customers can't be logged in or they would be able to order products without me getting a chance to add my profit to the price!

                      This doesn't make sense.  How would you make a profit, by charging more than the price listed by Norek?  What happens if visitors to your site saw your listed price but then go ahead and login to Norek and see a lower price?  And even if you display a price for the item on your page, how will customers place an order?  They can not do that if you do not have shopping cart functionality built-in to your site.  

                      I think you need to re-think this whole idea.  If you want to sell products that really come from  another online seller, you should probably be seeking a formal affiliate relationship.  For example, if you applied to be an affiliate of Amazon.com and were approved, you would be issued a special code that becomes part of your URL.  Then, when you place links on your site that lead to Amazon.com and the customer makes a purchase, you get a small commission.  

                      Do a Google search on affiliate selling.

                      paulinnorway

                        Topic Starter


                        Rookie
                        Re: JavaScript: Get info from other web pages
                        « Reply #11 on: October 26, 2006, 12:11:39 PM »
                        Quote
                        Quote
                        As you will notice, the middle frame contains no prices. This is because you need to be logged in as a business to see the prices. Obviously my customers can't be logged in or they would be able to order products without me getting a chance to add my profit to the price!

                        This doesn't make sense.  How would you make a profit, by charging more than the price listed by Norek?  What happens if visitors to your site saw your listed price but then go ahead and login to Norek and see a lower price?  And even if you display a price for the item on your page, how will customers place an order?  They can not do that if you do not have shopping cart functionality built-in to your site.  

                        I think you need to re-think this whole idea.  If you want to sell products that really come from  another online seller, you should probably be seeking a formal affiliate relationship.  For example, if you applied to be an affiliate of Amazon.com and were approved, you would be issued a special code that becomes part of your URL.  Then, when you place links on your site that lead to Amazon.com and the customer makes a purchase, you get a small commission.  

                        Do a Google search on affiliate selling.
                        Let me clear things up a bit. Norek is a company that sells ONLY to businesses (ie. me). To view their prices I need to log into my Norek business account. Then I can decide what profit to add onto the Norek price.

                        Think of norek as the wholesaler, and me as the retailer.

                        My web page will initially NOT cater for online sales, I just want my "walk-in" customers to be able to see the prices I'm offering them.

                        soybean



                          Genius
                        • The first soybean ever to learn the computer.
                        • Thanked: 469
                        • Computer: Specs
                        • Experience: Experienced
                        • OS: Windows 10
                        Re: JavaScript: Get info from other web pages
                        « Reply #12 on: October 26, 2006, 12:30:15 PM »
                        Once they see the price you're offering and they are interested, how would they place an order?

                        paulinnorway

                          Topic Starter


                          Rookie
                          Re: JavaScript: Get info from other web pages
                          « Reply #13 on: October 26, 2006, 12:37:03 PM »
                          Quote
                          Once they see the price you're offering and they are interested, how would they place an order?
                          Sorry, I should've made that clearer. I own an internet cafe, so once they've finished surfing they can just walk up to the counter and place their order through me. I would then log into Norek and place the order for them. They can pay at the counter.

                          soybean



                            Genius
                          • The first soybean ever to learn the computer.
                          • Thanked: 469
                          • Computer: Specs
                          • Experience: Experienced
                          • OS: Windows 10
                          Re: JavaScript: Get info from other web pages
                          « Reply #14 on: October 26, 2006, 12:58:56 PM »
                          Can anyone register on Norek?  You say Norek is a wholesaler but, as far as I can tell, anyone can register on their site.  Could they then place an order?  

                          If Norek is a wholesaler, I presume they cater primarily to online retailers, such as you.  I would also think they have some information on their site to assist clients in selling online.  Is this not true?  

                          It seems to me Norek should not even be shown on your site.  You should have your own shopping cart, with product info you've setup.  Norek is in the background.  Your customers need not even know about Norek.  

                          Apparently, you want to avoid that approach.  You're trying to do this with as little effort as possible, right?