473,883 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with embedding JavaScript page

6 New Member
I have this page: http://www.bekdavis.com/jcarousel/examples2/diane.html

and I need to embed it on the following page: http://www.scentsy.com/diane

http://www.scentsy.com/diane - I can only add a small snip of code to this page & I do not want it to be in a frame.

What would the code look like?

Thanks in advance!!!
bek davis
Jan 30 '09 #1
11 1382
17 New Member
Hello, bekdavis!

I don't know how to measure a "small snip of code" but here is one way you could do it:

- create a JavaScript file with a function that makes an XML HTTP Request (Ajax) to the page you wish to include. Also place a call to that same function in this file.

- in the main page include the JavaScript file and a placeholder for the request response.

Best regards.
Jan 31 '09 #2
3,112 Recognized Expert Specialist
Maybe an iframe? Or would that still count as a frame for you?

But I must admit, I don't see where this is connected to Java at all. If you could explain that, this might be the right place. Otherwise I'd be happy to move this thread somewhere else for you (e.g. the HTML / CSS or the JavaScript / Ajax Forum).

Jan 31 '09 #3
6 New Member
here we go....

the following page is a combo of html and java that I made. http://www.bekdavis.com/jcarousel/examples2/diane.html

I need to make the above page display on the following page: http://www.scentsy.com/diane

I cannot just copy and paste the HTML code b/c I am limited on the amount of code I am able to use. The page http://www.scentsy.com/diane is a replicating Network Marketing site and I am only allowed to put a tiny bit of code into the page to personalize it.

I want to be able to "display" all of the content that is on the page I created (http://www.bekdavis.com/jcarousel/examples2/diane.html).

I have tried the following and it does not work:

width=475 height=1024 data="http://www.bekdavis.co m/jcarousel/examples2/diane.html">


<!--#include file="http://www.bekdavis.co m/jcarousel/examples2/diane.html" -->

is there a way to place some java code on http://www.scentsy.com/diane to make my HTML created page display?

does this make sense?
Jan 31 '09 #4
3,112 Recognized Expert Specialist
Well, I checked that first site out and all I can find is HTML, CSS and JavaScript. Are you sure it's Java and not JavaScript you're refering to? (Although the some of the names suggest, that you're right and it is actually Java.)

Now, it would be great to know what type of code you can use for your second page (e.g. which language(s)) and what the length-limit is. Without knowing the tools, we won't be able to help you, I guess.

Oh, and why can't you use frames? I'm sure there's a good reason, but knowing the reason might help too.

Jan 31 '09 #5
6 New Member
this is the script i used to make the page: http://sorgalla.com/jcarousel/

Honestly, I am not sure what type of code I am allowed to use. I can tell you that there is another "replicatin g site" that has inserted the following code

Expand|Select|Wrap|Line Numbers
  1. <link href="http://www.XXXXX.com/cart/stylesheet.css" type="text/css" rel="stylesheet" /></p>
  2. <!--[if IE]><link type="text/css" rel="stylesheet" href="http://www.XXXXX.com/cart/ie.css" /><![endif]--><script type="text/javascript">
  3.     document.write('<script type="text/javascript" src="http://XXXXXX.com/cart/store-renderer.php"><\/script>');
  4. </script>
Frames: I need for my page to flow as if it were part of the replicating website page.

here is an example of what I am talking about. I don't want to link directy to it. You know where to place the DOTS.
www scentsy com/alice
Jan 31 '09 #6
3,112 Recognized Expert Specialist
OK, after checking that page I'm pretty sure, we're talking about JavaScript and maybe some Ajax, so I'm moving this thread to the JavaScript / Ajax Forum. I'm sure, our experts there will be willing and able to help you.

I can however think of one more question: Do you have the possibility to upload files (e.g. .js files) somewhere to one of those servers? If so, that could probably make life a lot easier.

Anyway, I'll let our JavaScript / Ajax Experts do their work from here on.

Jan 31 '09 #7
6 New Member
Thanks so much!!!

No, I am not able to upload any files to the replicating website. I can however upload files to the bekdavis.com website. ;)
Jan 31 '09 #8
6 New Member
any idea anyone? I would appreciate any ideas you may have.

Thanks in advance.

Feb 3 '09 #9
17 New Member
Hi, bekdavis!

As I mentioned on my first reply you can use Ajax. Here's a solution you could use:

1. Add this code to http://www.scentsy.com/diane:

Expand|Select|Wrap|Line Numbers
  1. <div id="bekdavis"></div>
  2. <script type="text/javascript" src="http://www.bekdavis.com/jcarousel/examples2/include.js"></script>
2. The include.js file looks like this:

Expand|Select|Wrap|Line Numbers
  1. function includePage(url, placeHolderId) {
  3.     var xmlhttp = false;
  5.     /*@cc_on @*/
  6.     /*@if (@_jscript_version >= 5)
  7.     // JScript gives us Conditional compilation, we can cope with old IE versions.
  8.     // and security blocked creation of the objects.
  9.      try {
  10.       xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  11.      } catch (e) {
  12.       try {
  13.        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  14.       } catch (E) {
  15.        xmlhttp = false;
  16.       }
  17.      }
  18.     @end @*/
  20.     if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  21.         try {
  22.             xmlhttp = new XMLHttpRequest();
  23.         } catch (e) {
  24.             xmlhttp=false;
  25.         }
  26.     }
  28.     if (!xmlhttp && window.createRequest) {
  29.         try {
  30.             xmlhttp = window.createRequest();
  31.         } catch (e) {
  32.             xmlhttp=false;
  33.         }
  34.     }
  36.     xmlhttp.open("GET", url,true);
  37.         xmlhttp.onreadystatechange=function() {
  38.         if (xmlhttp.readyState==4) {
  39.             document.getElementById(placeHolderId).innerHTML = xmlhttp.responseText;
  40.         }
  41.     }
  43.     xmlhttp.send(null);
  44. }
  46. includePage("http://www.bekdavis.com/jcarousel/examples2/diane.html", "bekdavis");
Additional notes:

- Your include page will have images, links, ... if you include it as is, without any change it simply won't work. Full URL for images and links must be supplied and every link should be specially crafted to use Ajax, otherwise when users click a link it will be either invalid or will redirect them to another page.

- This is one possible solution to your problem given the restrictions you imposed but, as Nepomuk stated an iframe should do the job just fine, even if the user has to scroll it would spare you a lot of development time.

Best regards!
Feb 3 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Mark | last post by:
I've been asked to convert a pay increase spreadsheet to an intranet page. So far I've developed a page that uses a combination of ASP and Javascript to retrieve all of the required information from the HR database. The problem is that I need to be able to calculate the new salary based on an increase_amount field, as well as maintain a running total of the increase amounts. Once the amounts have been determined, I then need to submit...
by: Paul Chao | last post by:
Hi, Newbie here so bear with me please. I'm wondering if it's possible to use Javascript to write a new page that contains other pages in the same domain without using frame or layer. Say I have "http://mydomain.com/page1.htm" and "http://mydomain.com/page2.htm" already. Is it possible to put a Javascript on "http://mydomain.com/page3.htm"
by: Alan Lue | last post by:
Hi, I'm trying to set up a webpage so that I can view multiple HTML files from the same page. For example, you might go to http://example.com/lab_tests.html and be able to view lab1.html, lab2.html, and lab3.html right on that page. If you're viewing this message w/a monospace font, the page layout might look like this: +-------------------+ | Header | * Code for Header and
by: Joe Bonavita | last post by:
I need to change images with the click of a button but I don't want the entire page to refresh so I thought I should just use an embedded page. I'm trying to use the <object> tag for this but can't figure out how to change the page in the code behind. I tried a javascript like this: System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script "); sb.Append("language='javascript'>");...
by: Kenneth McDonald | last post by:
Sorry for crossposting to several lists, but from what I can tell, what I want to do may involve several different areas of expertise. (None of which I have :-( ) I'd like to use Gecko as the UI for an application mostly implemented in Python. Ideally, I'd like to somehow come up with a Python module that wraps the Gecko, so that I can: 1) Create windows whose content is drawn by Gecko. 1) Dynamically manipulate what is shown by Gecko.
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
by: Anil Gupte | last post by:
How do I embed Windows Media Player so I can control it with VB code. I am familiar with embedding in a web page like this: *************** <embed src="Test.asx" width=320 height=300 autostart=True type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1" showcontrols=1 showstatusbar=1</embed> **************** I have also created a WM Player control in a VB Windows Application. But
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. The problem is when it creates transparent PNG format image then and it pixel ate the image. e.g. If i am using a gradient in background then it vary in color range. Now when i used that php script it generates image successfully but it pixel ate...
by: happyse27 | last post by:
Hi All, I am creating the perl script using html form(with embedded javascript inside). When using this html form with javascript alone, it works where the form validation will pop up javascript windows to say the field is not keyed into properly. However, when i convert this html(with javascript inside) into perl script, the perl script did not validate when i keyed incorrect data in the form and it straight away executed perl script...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.