473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

javascript swap with in line.

Fary4u
273 100+
using one line <p> or <div> content, how to swap values ? without using refresh browser and even html id elements.

Expand|Select|Wrap|Line Numbers
  1. <p><%= (Mid(arrDBinx(J+1, I),1,73))%>
  2.  
  3. <a href="#" onclick="javascript ob.innerHTML('<%= arrDBinx(J+1, I)%>')"> Read More...</a></p>
  4.  
  5.  
swapping values;
Expand|Select|Wrap|Line Numbers
  1.  
  2. <%= (Mid(arrDBinx(J+1, I),1,73))%>
  3. to
  4. <%= arrDBinx(J+1, I)%>')">
  5.  
  6.  
Oct 24 '11 #1
3 1625
acoder
16,027 Expert Mod 8TB
Effectively, it's a "Read more..." link, so what I would suggest is to hide the "more" content and display on clicking the link (hide by setting the 'display' setting to 'none' and show by setting to 'block').
Oct 24 '11 #2
Fary4u
273 100+
i don't want any more page to create.
dat is why on the same page i'm swapping the value

about display none or inline can't use coz it's array method if i use id to show or hide content then i've to assign each var with different values?
Oct 25 '11 #3
acoder
16,027 Expert Mod 8TB
You don't have to create any more pages. I meant hiding the content with something like this:
Expand|Select|Wrap|Line Numbers
  1. <p>some content up to 73 chars<span class="hide">hidden content</span>
where the "hide" class would contain the necessary CSS rule.

You don't need to set the IDs manually. You can use your server-side code to generate the IDs as well as the appropriate links.

The link itself doesn't need to have inline event handlers. Modern browsers can use advanced event handling or even the old-style link.onclick = someFunction;
Oct 25 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Erik-Jan Bakker | last post by:
Hello, I am stuck with a weird javascript problem.... ;-( Maybe it's somehting very simple, but I am really stuck in it, right now. What's the matter.... When place my website at a different...
1
by: Serge | last post by:
Good Day Folks, I'm trying to dynamically create some Javascript code. The simplest form of my asp.net code is shown below. Seems the compiler doesn't like the string constant "</script>". ...
16
by: howachen | last post by:
e.g. <script type="text/javascript" src="js/common.js"></script> but not <script type="text/javascript" src="js/common.js" /> for any reason?
1
by: czuvich | last post by:
All, I am trying to use both the OnCheckedChange event and the OnClick event in a Checkbox. I am currently doing some javascript for the OnClick Event as illustrated here: ...
2
by: rahuldb111 | last post by:
<script language="javascript"> function mmLoadMenus() { if (window.mm_menu_0405153337_0) return; window.mm_menu_0405153337_0 = new...
10
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario -------------...
6
by: Xcriber51 | last post by:
Hi I've come here after googling for this a day or two and not being able to spot what I'm looking for. I need a JavaScript IDE -- no frills, nothing special -- that offers me the ability to...
7
by: Jetus | last post by:
I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the "view" link. I don't know how to automate this next...
3
by: shatterah | last post by:
I am attempting to actively add multiple lines of text to the bottom of the page based on if conditions. However I am having trouble with breaking each message into its own line, making the text red...
9
whatelyb
by: whatelyb | last post by:
I am having trouble related to the attached coding. I am trying to make the object "flight1pic" change depending on what is selected in the drop down menus "airline1" and "aircraft1". My...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.