473,386 Members | 1,630 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,386 software developers and data experts.

x.style.borderStyle = 'dotted'; doesn't work

Hi,

I've in my web pages an affectation to this property but it's doesn't
work (same for all the others properties I'm trying to update):

here is the complete function I call on mouseover :

<script language="javascript">
function highLigth (x) {
x.style.borderWidth = '5px';
x.style.borderStyle = 'dotted';
x.style.backgroundColor ='red';
x.style.borderTop = '5px solid #BCC3F8';
x.style.borderBottom = '5px solid #BCC3F8';
}
function highLigthOut (x) {
x.style.backgroundColor = 'white';
}

</script>

and the result on my webpage :
http://avant-garde.no-ip.biz/cgi-bin...dz.cgi?lang=FR (slow dev
server)

May 4 '06 #1
3 4564
wrote on 04 mei 2006 in comp.lang.javascript:
Hi,

I've in my web pages an affectation to this property but it's doesn't
work (same for all the others properties I'm trying to update):
Works fine here. But pleace specify what "doesn't work" means.
Give error texts and what you want it to do.

However:
here is the complete function I call on mouseover :

<script language="javascript">
<script type='text/javascript'> "language" is deprecated
function highLigth (x) {
highLight is English
x.style.borderWidth = '5px';
x.style.borderStyle = 'dotted';
Do not specify constant styles here, but use a css declaration
x.style.backgroundColor ='red';
x.style.borderTop = '5px solid #BCC3F8';
x.style.borderBottom = '5px solid #BCC3F8';
}
function highLigthOut (x) {
x.style.backgroundColor = 'white';
}

</script>

and the result on my webpage :
http://avant-garde.no-ip.biz/cgi-bin...dz.cgi?lang=FR (slow dev
server)


Try this file:

=======================

<script type='text/javascript'>
function highLightOver(x) {
x.style.borderStyle = 'dotted';
x.style.borderColor ='red';
}
function highLightOut(x) {
x.style.borderStyle = 'dashed';
x.style.borderColor ='green';
}
</script>

<div
onmouseover='highLightOver(this)'
onmouseout='highLightOut(this)'
style='border-width:5px;width:300px;'>
xxxxxxxxxxxxxxxxxxxxx
</div>

=======================

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 4 '06 #2
al********@gmail.com said on 05/05/2006 7:31 AM AEST:
Hi,

I've in my web pages an affectation to this property but it's doesn't
work (same for all the others properties I'm trying to update):

here is the complete function I call on mouseover :

<script language="javascript">
The language attribute is deprecated, type is required.

<script type="text/javascript">

function highLigth (x) {
I would have expected "highLight", maybe you like that spelling.

x.style.borderWidth = '5px';
x.style.borderStyle = 'dotted';
x.style.backgroundColor ='red';
x.style.borderTop = '5px solid #BCC3F8';
x.style.borderBottom = '5px solid #BCC3F8';
}
function highLigthOut (x) {
x.style.backgroundColor = 'white';
}

</script>
Your issue is not the script, it may be CSS. A CSS group (like
news:comp.infosystems.www.authoring.stylesheets) can help with that.

Here is a test case based on your code that works in Firefox:

<script type="text/javascript">

function highLigth (x) {
x.style.borderWidth = '5px';
x.style.borderStyle = 'dotted';
x.style.backgroundColor ='red';
x.style.borderTop = '5px solid #BCC3F8';
x.style.borderBottom = '5px solid #BCC3F8';
}
function highLigthOut (x) {
x.style.backgroundColor = 'white';
}

</script>

<div style="width:100px; height: 100px;"
onmouseover="highLigth(this);"
onmouseout="highLigthOut(this);"blah</div>


--
Rob
Group FAQ: <URL:http://www.jibbering.com/FAQ>
May 5 '06 #3
ASM
RobG a écrit :
al********@gmail.com said on 05/05/2006 7:31 AM AEST:

[...]
function highLigth (x) {


I would have expected "highLight", maybe you like that spelling.


I prefer : "supraLux" :-)
--
Stephane Moriaux et son [moins] vieux Mac
May 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dynamo | last post by:
Hi again, Having had a little experience of HTML and style classes but only a limited knowledge of PHP perhaps somebody can tell me the pros and cons of the following. Surely if I write...
7
by: mr_burns | last post by:
hi, in html, how do i create a pop up description box for text. i want, in the same way that when you write the image alt tag and the user rolls the cursor over the image a pop up box appears,...
2
by: Jukka K. Korpela | last post by:
(Discussion started in c.i.w.a.h. under Subject "image alt style pop up for text", now changed to discussing the use of a title="..." attribute to create a popup info text, and how to make it...
55
by: James A. Donald | last post by:
In a book, a footnote is presented at the bottom of the page, in a slightly smaller type. converting a book to html, pages are bottomless, so we can put the footnote in a separate link, or...
4
by: terrorix | last post by:
I have create Style class instance and set up properties like this: Style st = new Style(); st.BackColor = Color.Black; st.BorderColor = Color.White; st.BorderStyle = BorderStyle.Solid;...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
1
by: Armin Gajda | last post by:
Hi, I have the following problem: An input field get a border assigned by a style class (e.g. 2px solid red). When the field gets the focus, we set the border to green. element.style.border...
8
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB"...
2
by: Randy | last post by:
I'm trying to loop through all of the textboxes on my form and change some of their properties. I'm stuck on changing the border style to none. Here is my code: Dim c As Control For Each c In...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.