Putting HTML In The Middle Of A Function?
Jul 1, 2011
set up a simple Function that allows me to create a thumbnail image viewer with headings and text.
One of the variables is a Hyperlink.
It all works fine but I want the hyperlink to open as a PopUp Window, but not sure how to do it.
My Code
function LoadGallery(pictureName,imageFile,titleCaption,captionText,titleText,textText,titleJob,jobText,title Pricelist,pricelistText)
{
var picture = document.getElementById(pictureName);
[Code].....
but what I want is when you click on the text "Click here to see Gemma's Service Price List" (specific to Gemma of course).
.... her price list opens in a popup?
(If you want to try this Gemma is the Director with the Burgundy haircolour, top left on the page).
P.S. I am using the <div class> and id to pass the variable data through the function and display the enlarged image and relevant text and hyperlink... if that makes sense ?
View 6 Replies
ADVERTISEMENT
Dec 1, 2011
Right now, I am busy preparing a website on which I want to 'exhibit' some of the paintings I've done in the last few years. Okay, it's only amateur stuff, I think it would be nice to be able to show some of my work to the world. My site will consist of a set of simple frameset pages; in the largest of these frames, I plan to put scans of the actual works, in other frames there will be a title, a menu, some additional texts and so on. Obviously, I want to present my images optimally. But of course, it's quite impossible to predict what size my 'painting frame' will be.
That is why I would <i>love</i> to have a piece of Javascript code
1) That will put my images exactly in the middle of the painting frame (aligned both vertically and horizontally),
2) That will use as much of the available space as possible, and
3) That will keep the aspect ratio of each image intact.
I've tried the nice 'Full Size Image' script that Eddie Traversa once made, but unfortunately, his script just fills up the entire frame space, distorting either the height or the width of the image concerned. You'll onderstand why this is not what I need here. In case you are interested: some of the paintings I did can be seen in a book I am also working on, PANTACYCLOPEDIA [URL] - I've used some of them as illustrations there.
View 2 Replies
View Related
Jan 19, 2011
I have not been able to do any JS because my damn books have been on order for the last 3 weeks put a script into my webpage so that when anybody visits the 'contact us' page they can leave comments.
Here's my code:
HTML:
<!DOCTYPE html "PUBLIC-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code].....
I know this doesn't validate but it's only a draft site until I get my books.
Here's the page, I want the comment underneath all three div's.
View 1 Replies
View Related
May 23, 2006
im using a cms that truncates content after 300 characters and sometimes the truncation is in the middle of an html tag (a href, span, etc.). When the content is truncated in the middle of a tag, the tag shows (which makes the UI downright ugly). Sooo....I was wondering is there a way to keep content together so that if a tag is in the middle of a truncation...that tag will be pushed to a new line? is there a special div tag or javascript function that can do this?
View 3 Replies
View Related
Mar 29, 2011
I was developing a site search for someone and I got it fully functioning-- the php calls on the input field with #searchField.All the user has to do is begin typing and the results appear underneath without ever having to click submit or enter/return.However, the customer was wondering if I could integrate the Wolfram Alpha Computational Search as well.So that a page visitor or user would type in the search field the results searching his site would appear below, as mentioned above; but, if one typed a query and hit enter then it would search WolframAlpha.I first made a page, here, that uses the code Wolfram Alpha's developer community was giving to developers that creates an input field and searches wolfram Alpha one hits enter. (It writes the necessary html in a messy way and includes this base.css file)Here is a screenshot of the html code that the wolframAlpha.js file writes from chrome dev tools.
After doing so, I put the code of the page I developed for my client and the above page together and what I got was two separate input fields, one that searches the site (top, but it doesn't work due because I did not attach that file as where this is located can't parse PHP) and one that searches wolfram alpha (bottom -- does work).You can see the result of the combined code here.
View 2 Replies
View Related
Dec 3, 2011
An example:
tabContent.css('width', '0')
.css('opacity', '0')
.filter(':eq(0)')
.css('opacity', '1')
.parent()
.find('.one-tab')
.addClass('active')
.css('cursor', 'default');
Now I want to apply the parent of tabContent a width, only if a condition is true. I do this, and works, but I don't consider this is a proper way:
tabContent.css('width', '0')
.css('opacity', '0')
.filter(':eq(0)')
.css('opacity', '1')
.parent()
.each(function() {
if (/*condition is true*/) {
$(this).width(aWidth + 'px');
}
$(this).find('.one-tab')
.addClass('active')
.css('cursor', 'default');
});
Is there a better way instead of using each() which is actually made for loops? In this case there is only one element.
View 3 Replies
View Related
Aug 8, 2011
On clicking a thumbnail I'm getting it's corresponding image through $.ajax method. So, the data I receive is in the form of html string i.e. <img src="image/1.jpg"/>.
Now I wanted to append this data into a div which has an id "container". So I done this by:
$('#container').hide().append(data).fadeIn('slow');
I have a function named "resize" which resizes the image according to the window size. Now when i tried this:
// this code is in executed on success.
$('#container').hide().append(data);
resize( $('#container img') );
$('#container').fadeIn('slow');
I had to click a thumbnail twice to load the image into the container. I don't know why is it so. So, I tried a different route. I tried to apply resize function upon the <img> tag received as data and then append it to the container div.
Which I did like this:
resize ($(data)) //alerting $(data).attr('src') shows the src of the image.
$('#container').hide().append(data).fadeIn('slow');
The image loads but it is not re-sized. What should I do? The re-size function I'm talking about, u can see it here: [URL]. Right now, I'm calling the resize function in the callback of fadeIn method, the image fades in and then resizes, but that looks very ..... unprofessional and ugly.
View 1 Replies
View Related
Aug 25, 2010
I'm building a webpage using javascript and iframes. Basically I have an iframe in the middle of the index.html page that links to another html page (let's call it iframe.html). My question is, is it possible to call a javascript function from iframe.html to control an object on index.html? If so, how do I do this? I'd like to be able to assign an image in iframe.html with the hyperlink of href="javascript:function()", where the function effects the CSS of a div on index.html.
View 2 Replies
View Related
Sep 29, 2005
I have an existing table with a form in it and am using the createElement function to create new input fields. The problem is that I dont know how to put the new row into the middle of the table...
View 3 Replies
View Related
Mar 21, 2011
I have a div and I want if the text is sort (below 100 characters for example) to set it at the centre of this div.How can I do that?
View 2 Replies
View Related
May 10, 2010
have the following problem, i am using jquery ajax to search somes names in my database it work fine till the name have '&' in them, is possible to Post values that have '&' in its content?
View 1 Replies
View Related
Jun 13, 2009
i have just built a website, sidelinesportz. I am using a news posting system with in an iframe in the middle of the home page but when ever you click on a link in that frame it stays on that same spot. But on other pages with in that iframe it goes to the top like I want it, it is just that home.php page that is the issue. I have tried different codes but I cannot get them to work.
View 2 Replies
View Related
Sep 8, 2010
i am building a website that address to other links .. how can i start the page i open/point at the middle or at any height i can choose?
View 3 Replies
View Related
Jan 25, 2011
I found a neat Flash image gallery here[url]...
Where images of cars appear in a slideshow and the special effect shows the image opening up from the center.
Are there any Javascript/AJAX, etc type galleries I can use to achieve this same effect?
View 2 Replies
View Related
Jul 21, 2011
I wanted to only match in the middle of a string
I have a string = " sdfasf 23234"
I wanted to get the numbers like /([0-9]*)/
But this fails and returns nothing because the string begins with letters. Instead I had to do /[a-zA-Z ]*([0-9]*)/
If that's the case then, why do we bother with something like
/^[a-zA-Z]*([0-9]*)$/
The pattern is already assumed to start at the beginning of the string
View 3 Replies
View Related
Feb 23, 2010
I want to create a rectangle with a line in the middle with the canvas object. The problem is that the line in the middle gets bigger than the rest of the rectangle. How do I solve this? I believe it has something to do with shadows. If so, how do I turn them off.
My code is:
View 3 Replies
View Related
Mar 10, 2011
Basically I want to factor a number and select the two closest numbers to the middle of the factors for example: 20 factors to 1, 2, 4, 5, 10, 20 I want it to return 4 and 5 If the number is has an odd number of factors (has to be a perfect square) I want it to select the middle number and say it twice for example:
64 factors to 1, 2, 4, 8, 16, 32, 64
I want it to return 8 and 8 Would I use an array or what? My code should probably look like:
[Code]....
View 21 Replies
View Related
Jun 23, 2010
I have just started learning JQuery and have a doubt in the below code. $.get('myhtmlpage.html', myCallBack);The doubt is should the 1st parameter of the get function be a HTML file or can it be a unction name?
View 1 Replies
View Related
Dec 19, 2011
I want to create an overlay to show a photo in the middle of the screen with a navigation menu. As overlay I use something like:
.overlay {
position: absolute;
top: 0;
left: 0;
[Code].....
View 2 Replies
View Related
Apr 27, 2010
Have been playing around with the UI. What i have spent all day trying to figure out is how to add a button or tab to toggle between the panes which would stick into the middle pane.
This is my sample...[url]
To explain further i created a graphic here of what i want to do [url]
View 1 Replies
View Related
Jul 14, 2010
I have a textarea with a specific width. I have wrap="off" set because I don't want to force my users to wrap if they don't want to. The reason for this is because this textarea is where the user is typing an email message. However I have a background image set on the textarea with a verticle line going down the textarea which indicates to the user the "Recommend Width"What I want to do is provide them with a link to click on which says something like "Wrap Lines" and when they click on it, the text within the textarea would wrap to the "Recommended Width" line in the background image. The maximum length of a line should be 53 characters when they click on "Wrap Lines" link.So I did some searching around and the code I came up with is:
Code:
function showLines(max, text) {
max--;
text = "" + text;
var temp = "";
var chcount = 0;
[Code].....
View 5 Replies
View Related
Mar 13, 2011
Im using Google Maps and when the user moves the map I have an event listener to return a string of routeIDs that are within the bounds of the map.Later on in the page I have a PHP MySQL statement where it Has [ICODE] SELECT * FROM routes WHERE [ICODE] , and after the WHERE I want to add this string.Basically as the user moves the map around, the list of available routes in bounds should change.How can I do this without redirecting pages at all, as that destroys the functionality of the google map?
View 1 Replies
View Related
Jul 11, 2010
I was looking for the way to detect outgoing click on middle mouse button. .click() only detect main button click.
View 1 Replies
View Related
Oct 7, 2009
If I am doing this:
alert($(".ivts_thead").find("tr:first").find("td").length);
alert($(".ivts_thead tr:first td").length);
I get in both cases the same result, the expected elements are in my object, but in the second case, I get a Firebug warning saying "Unknown pseudo-calls or pseudo-element 'first'". This happens each time I am adding any :filter to any selector which uses more than one single expression. Does that mean that I should create my selectors as I did in the first case?
View 1 Replies
View Related
Jun 2, 2011
I am using DOM table insertrow as such:
Code:
var _table = document.getElementById("TableList").insertRow(0);
_table.border = 1;
var cell0 = _table.insertCell(0);
var cell1 = _table.insertCell(1);
[Code]....
but it does not seem to work. how to get a border on the individual row?
View 1 Replies
View Related
Mar 18, 2010
I have a link and i am putting the id in href.
Code:
<a href="12345" id="myLink">link</a>
In IE 8.0.6 and 6.5 (not my machine but on coworkers machine) when link gets clicked, i get full path including the ID like "http://www.domina.com/folder/12345" where as on my machine i get the ID only when i do
Code:
myval = $("#myLink").attr("href");
When i move the ID to rel attribute, the browsers behave as intended.
Code:
myval = $("#myLink").attr("rel");
same version of IE on my machine is behaving ok where as on coworkers machine it is not. Am i doing some thing wrong here?
View 6 Replies
View Related