Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8519977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:24:11+00:00 2026-06-11T06:24:11+00:00

Enviroment: Visual Studio 2012, MVC4, Razor, Internet Application. I’m working with eBay API and

  • 0

Enviroment: Visual Studio 2012, MVC4, Razor, Internet Application.
I’m working with eBay API and I want to show the search results (JSON).
I have a view page with code…

<script>
function _cb_findItemsByKeywords(root)
{
  var items = root.findItemsByKeywordsResponse[0].searchResult[0].item || [];
  var html = [];
  html.push('<table width="100%" border="0" cellspacing="0" cellpadding="3"><tbody>');

  for (var i = 0; i < items.length; ++i)  
  {
    var item     = items[i];
    var title    = item.title;
    var pic      = item.galleryURL;
    var viewitem = item.viewItemURL;

    if (null != title && null != viewitem)
    {
      html.push('<tr><td>' + '<img src="' + pic + '" border="0">' + '</td>' + 
        '<td><a href="' + viewitem + '" target="_blank">' + title + '</a></td></tr>');
    }
  }
  html.push('</tbody></table>');
  document.getElementById("results").innerHTML = html.join("");
}
</script>

This line in “.js” file:

var url = "http://ebay.com?..."

How can I execute this url from “.js” file automatically, when I openning this View Page? (This url sending request to Ebay server and receiving data, which will be showed on this View Page.)

I will change a question a little…
If I’m running this code from the View page, everything works fine:

<script src=http://ebay.com?... </script>

How can I receive this part(“http://ebay.com?…&#8221; as a variable) from “.js” file? Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:24:13+00:00Added an answer on June 11, 2026 at 6:24 am

    Resolved…

    <script src="/Scripts/ebay.js" type="text/javascript"></script>
    <script>
        s = document.createElement( 'script' );
        s.src = url;
        document.body.appendChild( s );
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Enviroment: Visual Studio 2012, MVC4, Razor, Internet Application. I have a code with search
Enviroment: Visual Studio 2012, MVC4, Razor, Internet Application. I have a JavaScript array.. var
Enviroment: Visual Studio 2010, Windows Forms Application. Hi! I would like to rename (batch)
I think I may have accidently disabled stylecop in my Visual Studio 2008 enviroment.
Basically i want to know if the visual studio IDE and/or compiler in 2010
Enviroment: Visual Studio 2010 SP1 My goal of course is to use it in
Environment: Visual Studio Ultimate 2010 Windows XP WPF Desktop Application using .NET 4.0 We
After installing Visual Studio 2012 and opening/upgrading a Visual Studio 2010 solution from Team
Environment Visual Studio 2008 SP1 Visual C# WPF Application Project .NET Framework 3.5 Problem
I am attempting to get websockets working in my dev environment: Visual Studio 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.