|
Hi,
My requirement is to show long message in pop up or ALT with scroll bar when I click on read more or mouse over on readmore text.
I was thinking to show in div. When user click or mouse over on readmore text then the hidden div should show up and display the message. Is there any other better way to show?
Second, I want to give speaking type design to div with scroll bar. Does any one have code to do this?
Third, How to show small scroll-bar in div like we have in chat box of facebook.
Thanks in advance,
Inder...
|
|
|
|
|
Hi,
I need to display long message in a pop up on click or mouse over of read more. What are the possible ways to show message without opening in the another window.
I was thinking to show in ALT or open a hide div on mouse over or click of read more. Any other way to do this?
Second, if I use div then I want to show div in speaking design with tinny scroll-bar. please let me know how to do this? or please share code.
Thanks in advance,
Inder...
|
|
|
|
|
I would recommend searching for jquery plugins to do jquery dialogs. There are some nice plugins that will show dialogs for you and already have the code done.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
hi to all
i have an asp drop down and i want to access datasource in javascript
how can i do this?
like this code in c#
myDropDown.DataSource=mydatatable;
|
|
|
|
|
there is no concept of the datasource in javascript. your asp dropdown is rendered as an html select which is containing one or more option elements.
example:
<select>
<option value="index1">Some Display Info</option>
<option value="index2">Some More Display Info</option>
</select>
The code that you listed:
mehdi.sabet wrote: myDropDown.DataSource=mydatatable;
is run server side where that HTML gets rendered and sent down to the clients browsers where it will be visually rendered for the user(s) to see. if you want access to all of the items in the dropdown you will have to get the select element and then iterate through its children.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
If database is Access .mdb you could use this ^ or SQL db this ^
|
|
|
|
|
dusty_dex wrote: If database is Access .mdb
a web site built on Access??
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
The OP didn't state why or where they are running Javascript.
You can't assume it's always javascript for server side.
I sometimes use the JS Access version for HTML Applications, which provide self contained solutions and nary a web server in site. Totally portable in one simple zip file.
|
|
|
|
|
I have a bad taste for Access. probably after seeing too many terrible Access Basic deployed apps.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
dusty_dex wrote: The OP didn't state why or where they are running Javascript.
He did when he said it was an asp:dropdown meaning that the control is being rendered server side.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
|
<!doctype html>
<html>
<head>
<title></title>
<style>
.cards
{
background-color: blue;
height: 100px;
width: 75px;
margin: 20px;
float: left;
border: 2px solid orange;
border-radius: 7px;
}
</style>
</head>
<body>
<div class="cards"id="ace1"spades></div>
<div class="cards"id="king1"spades></div>
<div class="cards"id="queen1"spades></div>
<div class="cards"id="jack1"spades></div>
<div class="cards"id="ten1"spades></div>
<div class="cards"id="nine1"spades></div>
<div class="cards"id="ace2"hearts></div>
<div class="cards"id="king2"hearts></div>
<div class="cards"id="queen2"heart></div>
<div class="cards"id="jack2"heart></div>
<div class="cards"id="ten2"hearts></div>
<div class="cards"id="nine2"hearts></div>
<script type="text/javascript">
var cards = document.querySelector(".cards");
cards.addEventListener("click", card, false);
function card()
{
console.log("hello world");
}
</script>
</body>
</html>
|
|
|
|
|
because you are trying to add it into a collection of objects.
You can only use addEventListener on a target element, document or window. If you want to use a collection like this then you will have to loop through them and call the addEventListener for each.
also just an FYI but this won't work in IE8 either way.
this is just another reason to use a framework like jQuery because it abstracts this away for you. Even the IE8 issue so long as you aren't using jQuery 2.x.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
hi to all
how can i get short date string with this format 'yyyy-mm-dd' from a that with format like this
:
'THR FRI 2003'
in javascript
|
|
|
|
|
var d = new Date();
var weekday=new Array(7);
weekday[0]="Sunday";
weekday[1]="Monday";
weekday[2]="Tuesday";
|
|
|
|
|
is there an another simple way for do this like this method
.toLocalDateString()?
|
|
|
|
|
it is numeric value of date() and is local date of the world if you want obtain a locale date for any country, all i know...
modified 9-May-13 3:31am.
|
|
|
|
|
|
that is if you are a obtain a local date of any country on the world of countries you may use to toLocalDateString() API
|
|
|
|
|
oko but localDateString give me a dtae with format liek this 'thr 05 2013'
i want to to have a format like this '2013/05/12'
ok thanks for reply
i solved this problem with defien prototype for date that this prptotype give me a that with this format
thanks anyway
|
|
|
|
|
function prefixZero(n) {
var t = "00"+n;
return t.substring(t.length-2,t.length);
}
function shortDate(d) {
var mm = prefixZero(d.getMonth());
var dd = prefixZero(d.getDate());
return d.getFullYear()+"-"+mm+"-"+dd;
}
var today = new Date();
var sDate = shortDate(today);
The leading zero will be removed from month/date if they are 2 digits. You don't lose any speed doing it this way, because there is no need to check for mm & dd < 10.
modified 9-May-13 8:38am.
|
|
|
|
|
from Javascript codes to Java code to have an executable file? and I want to a java compiler for windows 7 32bit anyone can help on this topic from where I have a Java IDE on internet?
modified 8-May-13 13:16pm.
|
|
|
|
|
|
|
>"from Javascript codes to Java code to have an executable file?"
No. But you can compile javascript to java using the JS.JAR file (Rhino shell). But you can not get pure binary .exe this way.
You would be better off coding in Java directly which can create .exe via JNI
|
|
|
|