|
|
Ok I'm trying to figure out how to loop through the values of my table cells (they all have a image in them). When I created the cells I named them with a id="A2" (for example).
the code I've been trying in testing looks like this:
savedSquares = document.getElementById('A2');
alert("a2 = " + savedSquares);
alert(document.getElementById("innerSquares").rows[0].cells.length);
address = document.getElementById("innerSquares").rows[0].cells[3].value;
alert("cell = " + address);
The results in order are
A2 = [object HTMLTableCellElement]
10 (this is correct)
cell = undefined
I've tried a bunch of other combos but this is what I currently have.
The images are also named the same so the image in "A2" is also named the same way:
<img src="images/o.jpg" border="0" height="100" width="100" name="A2" alt="Open">
Not sure if that will make it easier but I haven't been able to read those with my limited knowledge of JavaScript. The looping through part won't be a issue, I just need to figure out how to get the name of the image or even the alt text would be doable.
Thanks in advance!!
|
|
|
|
|
Ok so I made some progress... if I use
savedSquares = document.images['A2'].alt;
it retreives the alt value which is a step in the right direction. Just wondering if there is a better way?
|
|
|
|
|
It's not very clear to me what you are trying to do. Table cells don't have values, they are just container elements.
If you have a table cell, you can loop through its contents using cell.childNodes (where 'cell' is your cell element). Or you could get a list of all the images contained in the cell with cell.getElementsByTagName('img') .
W3schools has a decent reference and tutorial: http://www.w3schools.com/jsref/dom_obj_all.asp[^]
|
|
|
|
|
hai all
i want to browse the folder or image in javascript...i saw a code in html like instead of this...i want in javascript...is it possible...
Thanks & Regards
D.Sathyanarayanan
|
|
|
|
|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Goood response... Thumbs Up...
|
|
|
|
|
Hi everyone I've got these lines in the plugin can anyone make me clear what these means so I can tweak it.Thanx in advance
settings = {};
settings.tile_orchestration = this.tile_orchestration;
settings.h_res = 12;
settings.v_res = 1;
modified 23-Jan-12 2:58am.
|
|
|
|
|
You want to tweak somethign when you haven't got a clue what it does or how it works? Hilarious.
ps what is 'Thanx'? Is that a new word? Stcik to full-blown English here or you'll get short shrift.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
That's cold dude...and sad news for you I'm already tweaking it...
P.S.You are trying to be an smart a*s here thats not cool. Anyway thanx for reply...oooh sorry u don't like the word thanx
|
|
|
|
|
You would have to refer to the documentation for the plug-in but it looks like it is setting default settings when it initializes.
|
|
|
|
|
hi friends
i need to know how to convert html contents into plain text.
these html contents are from the ajax editor.
any help would be of great benefit to me.
K.Gayathri
|
|
|
|
|
sTART here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Here is a sample code to accept the value(HTML) from a text field and gives the Plain text out of it:
function Check(){
var pattern = new RegExp("<(.|\\n)*?>","g");
//alert(pattern);
alert(document.formName.fieldName.value.replace(pattern,""));
}
The HTML Portion :
String :
Text field can be replaced by reading the HTML content from .html file also.
INPUT:
<title>My html page
Hello world
OUTPUT :
My html page
Hello world
HTH
Sovan
modified 24-Jan-12 4:32am.
|
|
|
|
|
Hi,
I have one query plzzz help me.
http://www.indiafirstlife.com/web/media/press-coverage
when i go this URL and click on this link-- IndiaFirst Serve Maharashtra State Customers - Sunskruti
then one pdf open. But problem is that my client is saying to me pdf should open by name itself only not by the whole url.
Means suppose we have one pdf name as Test.pdf, then we click on link then it should be name Test.pdf not like that---
http://www.indiafirstlife.com/downloadPDF/PressCoverage/Test.pdf-Windows Internet Explorer
in blue bar of opening page.
|
|
|
|
|
Did you notice the last three words in that part of the display? This information is the title text and is displayed by the application itself, in your client's case Windows Internet Explorer.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
what to do.....have u any code that i can solve this issue?
|
|
|
|
|
Solve what? Explain to your client this is IE, nothing to do with your website.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
In this case you can change the file open process. If you tweak your file download script cleverly then the file will be directly downloaded or opened with the associated PDF reader file. File opening with associated application will give another benefit. It is really disturbing for me when I try to open a file and it open in the current page
|
|
|
|
|
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi all,
I am using javascript in my coding, i am using a window.open to open the another link but instead i want open the link in same page and also i am using iframe.
How can i do it ?
Thanks in advance.
modified 24-Jan-12 2:18am.
|
|
|
|
|
Don't ask for Urgent help, it is very rude. This is a volunteer site and people will answer you on their time, not yours. Asking for Urgent help will more likely get you ignored.
No comment
|
|
|
|
|
Petty down-voting gets you even fewer responses.
Good luck.
BTW, this is VERY easy to solve.
No comment
|
|
|
|
|
window.location
And FYI, it is unnecessary to state that your issue is urgent. It might even be viewed as offensive.
|
|
|
|
|
Hi,
I have a PhoneSearch textBox in UserControlA. I want to disable or do not show it. The usercontrolA is being used in another UserControlB and finally the UserControlB is being used in a Test.aspx page. Now when I load the Test.aspx page and when I type in the PhoneSearch textBox the text disappear for the first time. I think some how there is a little page refresh is taking place in the first 3 to 5 seconds. But if I wait for first 5 seconds and then type in then the text stays in the SearchTextBox. So my idea is disable or do not show the Searchtextbox for the first few seconds and I think that may be the solution for page refresh issue (please mention if there is another way we can fix this and code snippet). I am not sure why there is a page refresh is taking place when the page loads of the first time.
Just as a side note the UserControlA and UserControlB both are inside an update panel and test.aspx is using a master page.
I am trying to use the below code in the userControlA as below but no luck
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Test.ascx.vb" Inherits="...Test" %>
<asp:UpdatePanel ID="SearchUpdatePanel" runat="server" RenderMode ="inline" UpdateMode="Conditional">
<ContentTemplate>
<asp:TextBox ID="PhoneSearch" TabIndex="5" runat="server" Width="160px"/>
<<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('<%= PhoneSearch.ClientID%>').show();
alert('<%= PhoneSearch.ClientID%>');
});
</script>
</ContentTemplate>
</asp:UpdatePanel>
I get ctl00_DefaultContent_UserControlB_UserControlA_SearchTextBox in my alert box and the $('<%= PhoneSearch.ClientID%>').show(); doesn't show the text box. Can some one help me with this?
Thanks in advance,
L
modified 17-Jan-12 6:07am.
|
|
|
|