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
ivosilva
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
Nepomuk
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).

Greetings,
Nepomuk
Jan 31 '09 #3
bekdavis
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:

<object
type="text/x-scriptlet"
width=475 height=1024 data="http://www.bekdavis.co m/jcarousel/examples2/diane.html">
</object>

also...

<!--#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
Nepomuk
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.

Greetings,
Nepomuk
Jan 31 '09 #5
bekdavis
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
Nepomuk
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.

Greetings,
Nepomuk
Jan 31 '09 #7
bekdavis
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
bekdavis
6 New Member
any idea anyone? I would appreciate any ideas you may have.

Thanks in advance.

bek
Feb 3 '09 #9
ivosilva
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>
  3.  
2. The include.js file looks like this:

Expand|Select|Wrap|Line Numbers
  1. function includePage(url, placeHolderId) {
  2.  
  3.     var xmlhttp = false;
  4.  
  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 @*/
  19.  
  20.     if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  21.         try {
  22.             xmlhttp = new XMLHttpRequest();
  23.         } catch (e) {
  24.             xmlhttp=false;
  25.         }
  26.     }
  27.  
  28.     if (!xmlhttp && window.createRequest) {
  29.         try {
  30.             xmlhttp = window.createRequest();
  31.         } catch (e) {
  32.             xmlhttp=false;
  33.         }
  34.     }
  35.  
  36.     xmlhttp.open("GET", url,true);
  37.         xmlhttp.onreadystatechange=function() {
  38.         if (xmlhttp.readyState==4) {
  39.             document.getElementById(placeHolderId).innerHTML = xmlhttp.responseText;
  40.         }
  41.     }
  42.  
  43.     xmlhttp.send(null);
  44. }
  45.  
  46. includePage("http://www.bekdavis.com/jcarousel/examples2/diane.html", "bekdavis");
  47.  
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

6
6378
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...
3
1156
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"
8
1804
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
5
1401
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'>");...
0
2149
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.
3
13681
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
5
3420
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
1
3399
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...
3
3917
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...
0
9933
marktang
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...
1
10836
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,...
0
9568
agi2029
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...
1
7964
isladogs
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...
0
7115
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();...
0
5794
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...
0
5983
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4607
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
2
4211
muto222
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.