Affecting An Html Element Before Opening It
Nov 20, 2010
I'm making a site for my g/f – She's writing angel messages for each day of the year, 1 message on 1 page and these (eventually 366 pages) are accessed from this one page:
[URL]
This menu page uses JS to slide to particular months. The place I'm stuck is how could it be possible to go from a particular days message, back to the month of that message in the per-datum page (having the page slid to that month)...
for clarities sake... “Terug” means “back”, so for example to click on october 22nd message, read the message, and terug back to Octobers seeds rather than back to the per datum pages month selection calender.
My best effort so far is to put this in the a tag:
onclick="document.getElementById('waarzegstermove').style.cssText='left: -1000px;';"
-1000px would be Januarys terugs, -2000px Februarys terugs etc to have it already slid to that month, this code works when on the same page, but when its on the message page before loading up the per datum page it seems to lose this setting.
View 1 Replies
ADVERTISEMENT
Apr 29, 2010
I am working on a e-commerce site and I need to hide the checkout link (<a>) if the value of of the element (<td>) holding the amount due ="$0.00".
<tr
>
<td
colspan
[code]....
View 2 Replies
View Related
Dec 18, 2007
i basically have a log (log.xml) that i'm wanting to add a new "row" to everytime something happens in the web application. however, log.xml has the potential to get huge and opening/saving/etc... could start taking up quite a bit of resources.
i'm just wanting to simply add a new row to the xml file without pulling in the entire xml file. can this be done?
the log looks something like this...
<log>
<entry date="12/18/2007 12:03:42" description="This is a test."></entry>
</log>
and i just want to keep adding to the xml without opening up the entire file.
i also have PHP loaded on the system - so maybe that's an option as well... pass the entry through javascript to PHP and have it write the new entry?
View 1 Replies
View Related
Feb 27, 2011
I want to click on a picture, have a shade slide across to "close" the image, then open a new html in the same window. I can do both independently, but the page opens off the <a> tag instead of any jquery I know to use, so the new page opens before any animation happens.
View 2 Replies
View Related
Oct 4, 2011
I am trying to replicate the function that is on this page [URL] - where the links on the right open an external HTML page that activates a dialog window and the whole thing floats above the parent page. I've ripped apart the JS file but it goes beyond my understanding and has references to demo this and demo that - which isn't going to sit well with my existing code. I am trying to see if there is a simpler version of this function that doesn't require 155 lines of JS. I found the JS code to open an HTML page inside a DIV using ht e object ID method but it still acts like an iFrame and my dialog window is trapped inside, not floating above the parent page. I've even tried to use the CSS overflow: visible; but I'm sure there is more to it than that - especially since it didn't help ;) I can't use AJAX or PHP like many of the scripts I found use, so i has to be just like the page I gave as an example.
View 3 Replies
View Related
Apr 26, 2010
I want to place all opening tags in an array.
In the example below, the following array should be created:
var tagsOpen=new Array();
tagsOpen[]='<h1 class="h">';
tagsOpen[]='<p>';
tagsOpen[]='<strong class="w">';
[Code]....
View 2 Replies
View Related
Aug 22, 2005
I am searching for a cross-browser way (the most recent browsers are fine) to use javascript to open a new window even though I do not know the file I want to call. I do, however, know the HTML code I want output in the new window. It would look like:
View 5 Replies
View Related
Apr 14, 2009
I have a JS which I have already started to try to customise, but I am having some difficulty with it in that when I click on an image, it does not take me to my html page.with care.html. Although all files are in the same folder, I get an error indicating that the fille cannot be found (I have checked the file name spelling). I am not doing any of this online as the Web pages, when working, will be put on CDs.
View 7 Replies
View Related
Apr 26, 2010
I want to place all opening tags in an array. In the example below, the following array should be created:
Code:
var tagsOpen=new Array();
tagsOpen[]='<h1 class="h">';
tagsOpen[]='<p>';
tagsOpen[]='<strong class="w">';
tagsOpen[]='<p>';
tagsOpen[]='<span style="color: red">';
tagsOpen[]='<span style="color: blue">';
tagsOpen[]='<span style="color: green">';
That array should be dynamically created from this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]">
<html xmlns="[URL]">
<head>
<title>Title</title>
</head><body>
<div id="content">
<h1 class="h">Heading</h1>
<p>Hello <strong class="w">World</strong>.</p>
<p><span style="color: red">red</span> <span style="color: blue">blue</span>
<span style="color: green">green</span></p>
</div><script type="text/javascript">
/*<![CDATA[*/
var obj=document.getElementById('content');
if(obj) alert(obj.innerHTML);
/*]]>*/
</script></body></html>
View 2 Replies
View Related
Sep 21, 2011
I have url links in an Access Database which open different info screens depending on the record. I want to include some code in the html which isn't blocked by browsers, but restricts the html code to an initial window of approx 800x600, but can be resized, but importantly the database screen doesn't 'get lost' underneath the browser window.
View 5 Replies
View Related
Oct 13, 2009
I'm having some problems understanding the append() function. What I'd like to do is select an element using it's ID and add a row to the table with a HTML form element. The table is dynamically generated using a Django template ( form.as_table() ) so I'm not able to alter the original HTML markup too much.
If I had a table like this...
View 3 Replies
View Related
Apr 26, 2010
I was just wondering why the use of lightbox is affecting the javascript slider.
Take a look at this page:
[URL]
The images down the right are clickable(lightbox)
Now the header should be a JS slider like on this page: [URL]
Notice the slider works on this page.
View 1 Replies
View Related
Nov 8, 2011
I am having is when I click on a link that contains:
$('ul:first a').filter(function(i) { return $.trim($(this).text())== ''; }).text('OSIS')
It changes all the available links that contains text()==''. however I only want it to change the first available link.
Here is some of my code as an example:
$(document).ready(function() {
$('#osisbox').click(function() { $('ul:first a').filter(function(i) { return $.trim($(this).text())== ''; }).text('OSIS')
[Code].....
View 1 Replies
View Related
Apr 20, 2011
.change() is only for form elements minus check boxes/radio buttons, etc.Are any of you aware of a script that does this already? Hopefully one that is easy to implement.I just want to monitor things like height, number of inner elements, or any change in the inner HTML.
View 1 Replies
View Related
May 27, 2006
I notice when I design a basic HTML page, it
is affected if a WinXP user has Large Fonts set in their Control Panel.
However some pages, e.g. www.bbc.co.uk/news are unaffected by this I think.
They are definitely not affected by changing the font size within the
browser.
Because I want to add tables, which will word-wrap incorrectly if the font
size is changed, how can I disable allowing the browser to do this?
Basically I want the font size to stay how I designed it. If they need it
bigger, they can use the zoom option in more recent browsers. Code:
View 54 Replies
View Related
Dec 11, 2009
I have javascript in an iframe that controls showing/hiding of divs. This works great, but after the javascript is executed it changes the behavior of anchor tags of the main window of the website (namely - links in the main window all open in new windows and not in the specified target iframe). I've searched and searched and looked up all sorts of things, rendering me a confused and frustrated fellow.
[Code]....
View 2 Replies
View Related
May 28, 2010
I have a listing of items on the page and each one has a <div> with a description in it. There are two versions of each description, one short and one full length. I like the user to be able to swap between them by clicking the 'more' and 'close' links. The problem with what I wrote is that it applies to all the divs on the page instead of the specific one that was clicked. What can I change to correct it?
The jQuery:
$(document).ready(function() {
$('div.desc > p.desc-full').hide();
$('a.more').click(function() {
$('div.desc > p.desc-trunc').slideUp('fast');
[Code].....
View 1 Replies
View Related
May 20, 2011
I have a jquery script converting a XML file into html and part of the script is set to display an image based on the value in one of the elements. It's almost working as planned except that it affecting the preceeding record instead of the record that meets the conditions of the if/else statement.[code]
View 2 Replies
View Related
Feb 17, 2010
I'm quite new to jQuery and have this working, though I'm fairly sure if this won't be an efficient way to do this. I have a form with each day of the week, and each day has a choice in the number of slots which then shows the correct number of slots for entry for that day.
The form:
<table border="0" cellspacing="0" cellpadding="0" class="DataTable"><tbody>
<tr>
<th>
Day
</th>
<th>
Slots .....
This is simplified just a little as there are more than the 1 input in an 'Entry Section' (eg .Entry3). The jQuery I have working here is:
<script>
$(document).ready(function(){
$("#frmSlots1").change(onSelectChange);
});
function onSelectChange(){ .....
That's working fine, except I do want to have 7 days so that would be quite a lot of replicated jQuery code. I am thinking there will be a way to identify the select item with the others so jQuery will know which to adjust without having to spell every single item out. Is there an easy way to achieve this in the above?
View 1 Replies
View Related
Jul 17, 2010
Let's say I have a URL like this:
Code:
[URL]
How do I fetch the ID with jQuery? What I want to do is to fetch it and then display content in a <div> that depends on the ID value. Do you know how to do that?
View 1 Replies
View Related
May 30, 2006
I'm trying to remove an html element in the example below. I don't see
the "bye" message at the end and there are no errors reported in
Firefox or exceptions caught if I wrap the remove child line in a
try-catch. Any ideas what is wrong?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>garbage</title>
</head>
<body>
<div id="my_div">hi<div>
<script type='text/javascript'>
var my_div = document.getElementById("my_div");
my_div.parentNode.removeChild(my_div);
document.write("bye");
</script>
</body>
</html>
View 2 Replies
View Related
Jul 19, 2006
I have a page where I do:
var e = document.createElement('img');
e.src = "myimg.jpg";
e.id = "i";
In some functions I need to get the html code of e, i.e. "<img
src="myimg.jpg" id="i">. Is there a method like "getHtmlSource" of the
element?
View 1 Replies
View Related
Jan 3, 2007
I am trying to parse a HTML page and want to replace the input element The following code fails all the time.
var ex = "<input type="hidden" name="__VIEWSTATE"
id="__VIEWSTATE"
value="/wEPDwULLTE2NjEyNTI0MThkGAEFEHNlY3Rpb25zR3JpZFZpZXc PZ2QN271==
/>";
var regEx = new RegExp("<s*input[^>]*>(.*?)s*/");
if (ex.match( regEx))
{
alert('match');
}
else
{
alert ('no match');
}
View 1 Replies
View Related
Aug 25, 2011
Trying to add the text "• " to a text area, but it will just print the symbol. Is there a way you can print the string itself? code...
View 1 Replies
View Related
Apr 15, 2010
I'm trying to make a script (i'm a bit of a JS newb) which is called every time a change is made to an input box and will show an image either a tick/check or a cross depending on whether the values of two total boxes match. The script looks right to me but the image doesn't show.
HTML Code:
<?php include 'includes/config.inc.php'; ?>
<html>[code].....
View 2 Replies
View Related
Jul 23, 2005
Is there any way to make a <div> section
overlap the (windowed) content of a java Applet?
I'm asking this, because JavaScript menus usually
ends up beneath Applet windows..
View 4 Replies
View Related