JQuery :: Including External Pages / Selecting Text Fragments?

Jan 9, 2011

I want users to specify external sites, a) include them, and let b) users annotate certain paragraphs of text.

a)

As this sites are external (not on the same domain) I cannot use iframes since I cannot select text then, as I understood, right? So I need to create a proxy page which integrates them in the local domain. If this works, I guess the problem are relative urls - does anyone know a good way to correct these? Furthermore, do I need an iframe, or is there another way?

b)

I would like users to be able to select text paragraphs and add a description. Ideally I would get XPath for the selection. Is there a tool/plugin to do this? Like select some text and get the XPath for it?

View 1 Replies


ADVERTISEMENT

Including One External JS File Directly Into Another

Feb 3, 2007

I am seeking a method to load one JS file directly into another,
*without* having to dynamically write <scripttags.

Is there any method whereby I can call only one external JS file using a
single <scripttag, but have that external JS file insert into ITSELF
the contents of five others? Code:

View 38 Replies View Related

Including External Javascript Code In A Web Page

Jul 23, 2005

Is there any way to embed the included code snippet in a function (in the case where it is not already a function in the remote souce file)?

View 8 Replies View Related

Including External Php File Doesn't Work In IE?

Jan 13, 2011

I am trying to include external .php file into .js file using document.write('<scr'+'ipt src="http://www.xyz.com/store.php" type="text/javascript"></scr'+'ipt>')

its working fine in mozilla firefox and chorm but its not working on internet explorer, version 8. I havent tried with other version but on this version its not working.

I have also tried loading this file dynamic using DOM functions. appendChild() but its the same result.

View 1 Replies View Related

Including External Javascript Files At Runtime

Oct 15, 2007

I need a way of loading api scripts on the fly. ie. if the user clicks on a link the javascript would suck in the api script depending on what the user has selected. By api script I mean:

<script src="http://api.maptp.map24.com/ajax?appkey=blahblahblahthisisakey" type="text/javascript"></script>

I am using the maps24 api to build an address finder - ie. put your postcode/zipcode in and populate the rest of the address details. For some reason you need to load a different js file for each region (north america, europe, etc). I want my users to click on their region and have the <script> tags inserted into the head. I have done this using javascript but the functions don't seem to be available. I am assuming that the page needs to refresh??

Does anyone know away of making the javascript functions available to use without having to refresh the page? In other words, loading javascript files on the fly.

View 16 Replies View Related

JQuery :: Selecting Wordpress Menu Lists In Child Pages?

Jul 19, 2011

This code works on my wordpress parent pages but not on child pages. The code output looks exactly the same on the parent and child pages when viewed in firefox's firebug.

[Code]...

To see it in action: [URL].. View the cart, which is a child page of the store and you'll see the problem.

View 2 Replies View Related

JQuery :: Load External Html Pages In Menu?

Oct 13, 2011

Is there any way to load the external HTML pages into a DIV with links.

For example if is click link 1 it has to load one.html, if I click link 2 it has to load two.html.

The link will be given in <a> tag itself. Example <a href="one.html">Link1</a> and
<a href="two.html">Link2</a>

I tried to load using the below script but the URL has to be given inside the script. But my requirement is it has to take from the href and load in the DIV id content.

<script type="text/javascript">
$(document).ready(function(){
$('a.more').click(function() {

[Code].....

View 5 Replies View Related

JQuery :: Loading External HTML Pages Using .load() And Internal Is Not Working

Mar 16, 2010

I have a master.html where i have navigationDIV and bodyDIV, and on every click of nav tabs i am loading external html page into bodyDiv using following .load() function. $('#bodyDiv').load('home.html') Now I have some basic JQuery functions in external JS file which i have linked in master pagewhere i am using toggleSlide(), hide(), addClass() so and so forth, first time when page is getting load all these functions are working alright but the moment i am loading another tab page all functions stop working even on first tab also. Tab onClick script from where .load() function is getting fired:

<li id="one"><a href="#first" onclick="javascript:$('#bodyDiv').load('home.html')" >Home</a></li>
<li id="two"><a href="#second" onclick="javascript:$('#bodyDiv').load('trade.html')" >Trading</a></li>

Note FYI: I have used Jquery Tab UI on this page, the scrip is as below:

[Code]...

View 5 Replies View Related

Controlling Frames Containing External Pages?

Apr 7, 2011

I have an index.html that sets up 3 Frames. They are called FrameTop, FrameA and FrameB. See pic below. In FrameTop the user can type in a url into a textbox with id="urlINPUT". When user clicks LOADA it loads that url into FrameA. User can then browse web in FrameA, clicking links etc and going to new pages. The second button LOADB is designed to determine the current location/url of the page displayed in FrameA and load that into FrameB. So far when I write the javascript in FrameTop LOADA works but LOADB loads the FrameTop into FrameB! [error!]

-----------------Index.html-------------------------------------
<frameset rows="5%,*">
<frame name="FrameTop" src="frame_top.html" />[code].....

View 1 Replies View Related

Loading External Pages In Lightbox?

Aug 31, 2011

I was wondering if it is possible to load external pages (from a different server) into a lightbox, without using a iframe.

View 5 Replies View Related

Including A Javascript External File From The <body> Part Of An HTML File

Sep 26, 2007

I got an [object error] from IE 7.0.5730.11 when moving the <script
src="..." type="text/javascript" /tag from the <headpart to the
<bodysection of a HTML file.

Is not possibile to include Javascript code via <script src="..."
type="text/javascript" /from the <bodysection, instead from the
<headone? If yes, anyone has any idea of which the problem could be?
If not, how can I programmatically include a javascript external file
inside the <bodypart of a HTML file, for example, using Javascript
to some particular native functions?

View 1 Replies View Related

Load External Pages (from A Different Server) Into A Lightbox, Without Using A Iframe?

Aug 31, 2011

load external pages (from a different server) into a lightbox, without using a iframe.

View 6 Replies View Related

Need Code To Load Pages Into A Frame Using An External File

Dec 9, 2005

I need a JavaScript code to load pages into another frame. The thing is, I want to control the pages that are loaded using an external javascript (.js) file.

View 7 Replies View Related

Print A <div> Including Background Image And Text Formating

Oct 12, 2009

I'm trying to use the following javascript to print a <div> on a web page:

function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint =

[Code]....

Using the above javascript I have no background images although they're included in the <div> and the text is formatted LtR instead of RtL. Any ideas how I can get the <div> to print correctly using javascript.

View 2 Replies View Related

Including The Amazon Search Auto Suggestion Text Box On Website

Feb 25, 2011

how I go about including the amazon search auto suggestion text box on my own personal website. It works pretty much the same as google.

View 1 Replies View Related

JQuery :: Loading External Text In To A Text Area?

Sep 7, 2009

<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hello, I would like to know if I can load a small text from a external source into a textarea. the external source is a php that will write some clean text depending on the vars received. I know load() can do the job for a div but I don't think it will work for a textarea.
</td></tr></table>

View 2 Replies View Related

JQuery :: Selecting Only The Text Within An Anchor?

Aug 29, 2011

<a href="google.com" id="test"><span>0</span>The text that I actually want</a> Using JQuery I want to be able to select "The text that I actually want". $('#id').text // outputs 0The text that I actually want Is there a way to accomplish this?

View 6 Replies View Related

JQuery :: Selecting Text Without Tags?

Jul 29, 2009

I have the following HTML (generated by a CMS):

<div id="breadcrumbs">
<a href="/" class="selectedPageRoot">Home</a>
Our Partnership & Services
</div>

how to select the text "Our Partnership..." inside of $("#breadcrumbs").

View 10 Replies View Related

JQuery :: Selecting Lowest Element Containing Text?

May 28, 2009

I need to select the lowest element containing a given string.The :contains(text) selector returns the element I want but also allits ancestors (since they too contain the text). I haven't been ableto figure out a selector expression that returns only the lowestelement.

View 1 Replies View Related

JQuery :: Selecting A Input Text Within A Table?

Sep 26, 2011

Here is my HTML

<table bindtype="spinner" class="keypadfield" spinnermin="0" spinnermax="9" spinnerdefault="5" bindname="seg12dtm" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input name="seg12dtm" type="text" class="inputnumericupdown" id="txtseg12dtm" maxlength="1">
</input>

[Code]...

View 1 Replies View Related

JQuery :: Selecting Text Part Of 'a' Element?

Nov 12, 2011

You can't select the 'text' part of an 'a' element with css, e.g. in the statement <a>some text </a> you can't use a css attribute selector a[text = "some text"]{} to style the 'a' element. You can select all named attributes such as HREF, TITLE, etc. Does jquery's .attrib map strictly to the css usage or is there some way I can match on that part of an 'a' element?

I need this because a menu list I'm working with doesn't by default require a TITLE element so I can't assume I can match on this attribute.

View 6 Replies View Related

Loading Multiple External Html Pages At One Html Page?

Dec 28, 2010

I tried to load 1 html through ajax and javascript and it worked.But i want to load more than one and i cant.I thought that it would be a good idea to put the ajax files to the external websites and put the same load button.I tried this idea but it doesn work.I can only load one external website.

View 2 Replies View Related

Same Text - Different Pages?

Mar 7, 2009

You know when you have a menu on a page, and have.. let's say.. a 100 other pages.

Say the menu is like this:

Now: you want to add a page to this menu. Instead of adding a page to every single menu, could you have (earlier) edited in this:

Or wouldn't this work?

I asked about how to do this in another place once, and got a reply about using 'PHP inputs', but I'm using tutorials for JavaScript now, and it seems like this would do it. Would it work?

View 3 Replies View Related

JQuery :: Append External Text File To DIV

Apr 21, 2010

I have multiple poems [3 in this trial] (held as external .txt files containing <br> line breaks) that i wish to display at random on each site visit. I don't know how to load them into a specific 'div' area or (if necessary) assign them to a variable.

<script type="text/javascript">
var whichpoem=1+(Math.round(Math.random()*(2)));
var group='/poem'+whichpoem+'.txt';
var client = new XMLHttpRequest();
client.open('GET', group);
client.send();
$.get(group, function(data){
$("body").append(data);
});
</script>

View 2 Replies View Related

Selecting Text At The Cursor

Aug 14, 2006

Can anyone show me how to select text before or after a cursor in a
textarea or an RTE?

View 2 Replies View Related

Selecting Highlighted Text

Aug 11, 2006

It needs to allow the user to highlight some text within a paragraph. If the correct text (with an error) is selected it should provide feedback that the user has correctly selected this text.

So what I need to do is

1. Get the text selection
2. Compare this text selection to a predefined answer
3. Provide feedback to the user e.g. they are correct if text selection = predefined answer, and incorrect if text selection != predefined answer

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved