Unread 02-29-2008, 06:11 AM
ISMAILC ISMAILC is offline
Member
Join Date: Dec 2007
Posts: 45
  #1  
Question No focus on page, when page loads

Hi, i'm using an xslt file that loads my page - which does not use a body.

The problem i have is that everytime i open the page the focus is on the submit button. I don't really want that - where i just want no focus when the page opens up. I geuss a javascript is needed but i also dont have a body tag!

Any ideas!

Please assist!

Regards
Reply With Quote
Unread 02-29-2008, 02:02 PM
Admin
Posts: n/a
  #2  
Default

Can you post the output / HTML of the page? Is there an onload handler that's setting focus to that submit button?
Reply With Quote
Unread 03-03-2008, 06:45 AM
ISMAILC ISMAILC is offline
Member
Join Date: Dec 2007
Posts: 45
  #3  
Default Thanks - i don't have a body to do an onload

Thanks - i don't have a body to do an onload

[code]
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove">
<xslutput omit-xml-declaration = "yes" />
<xsl:template match="/">
<table width="100%" class="tbDetail">
<!-- Tracking stuff -->
<tr>
<td>
<SCRIPT TYPE='text/javascript'>
function hideHist()
{
if (typeof fcHist != 'undefined')
{
fcHist.style.display = 'none';
}
}
</SCRIPT>
<!--
<link rel="stylesheet" type="text/css" href="balloontip.css" />

<script type="text/javascript" src="balloontip.js">
</script>
-->

<script TYPE='text/javascript' src="./codebase/dhtmlxcommon.js"></script>
<script TYPE='text/javascript' src="./codebase/dhtmlxcombo.js"></script>
<link rel="STYLESHEET" type="text/css" href="./codebase/dhtmlxcombo.css"></link>

<script TYPE='text/javascript'>
window.dhx_globalImgPath="./codebase/imgs/";
</script>
</td>
</tr>
<xsl:variable name="cHist" select="count(Activity/myTracking/Activity[ DateResolved != '0' ])" />
<xsl:if test="$cHist &gt; '0'">
<tr width="100%">
<td colspan="6" class="row1">
<SCRIPT TYPE='text/javascript'>
function toggleHist(srcElement, srcArrow) {
if (srcElement.style.display == 'none')
{
srcElement.style.display = '';
srcArrow.src = 'images/expand.gif';
} else
{
srcElement.style.display = 'none';
srcArrow.src = 'images/collapse.gif';
}
}
</SCRIPT>
<span id='fcHistMain' style='cursor:hand;' onclick='toggleHist(fcHist, fcExpand)'>
<span style="vertical-align:middle;">
<img src='images/collapse.gif' id='fcExpand' align="middle" /> Expand to view the History
</span>
</span>
</td>
</tr>
<tr>
<td colspan="6">
<div id='fcHist'>
<table width='100%' class='tbList'>
<xsl:for-each select="Activity/myTracking/Activity[ DateResolved != '0' ]">
<xsl:sort select='@id' />
<tr>
<td width='5%'><xsl:attribute name='class'><xsl:if test="position() mod 2 = 1">on</xsl:if><xsl:if test="position() mod 2 != 1">off</xsl:if></xsl:attribute><xsl:value-of select="position()" />. </td>
<td width='55%'><xsl:attribute name='class'><xsl:if test="position() mod 2 = 1">on</xsl:if><xsl:if test="position() mod 2 != 1">off</xsl:if></xsl:attribute>
<xsl:if test="TrackValues = 'False'">
<xsl:value-of select="Description" />
</xsl:if>
<xsl:if test="TrackValues = 'True' or TrackValues = ''">
<a>
<xsl:attribute name='href'>myTrackingPage.aspx?type=a&amp;id=<xsl :value-of select="@id" /></xsl:attribute>
<xsl:attribute name='class'>bn</xsl:attribute>
<xsl:value-of select="Description" />
</a>
</xsl:if>
</td>
<td width='20%'><xsl:attribute name='class'><xsl:if test="position() mod 2 = 1">on</xsl:if><xsl:if test="position() mod 2 != 1">off</xsl:if></xsl:attribute>
<xsl:if test="CreatorEMail[. = '']"><xsl:value-of select="Creator" /></xsl:if>
<xsl:if test="CreatorEMail[. != '']">
<a>
<xsl:attribute name='class'>bn</xsl:attribute>
<xsl:attribute name='href'>mailto:<xsl:value-of select="CreatorEMail" />?Subject=<xsl:value-of select="Description" /></xsl:attribute>
<xsl:value-of select="Creator" />
</a>
</xsl:if>
</td>
<td width='20%'>
<xsl:attribute name='class'><xsl:if test="position() mod 2 = 1">on</xsl:if><xsl:if test="position() mod 2 != 1">off</xsl:if></xsl:attribute>
<xsl:value-of select="substring(DateResolved,1,4)"/>/<xsl:value-of select="substring(DateResolved,5,2)"/>/<xsl:value-of select="substring(DateResolved,7,2)" /> 
<xsl:value-of select="substring(TimeResolved,1,2)" />:<xsl:value-of select="substring(TimeResolved,3,2)" />:<xsl:value-of select="substring(TimeResolved,5,2)" />
</td>
</tr>
</xsl:for-each>
</table>
</div>
</td>
</tr>
</xsl:if>
Reply With Quote
Unread 03-03-2008, 07:14 AM
ISMAILC ISMAILC is offline
Member
Join Date: Dec 2007
Posts: 45
  #4  
Smile Great!!! - I got it going!

Hi, Thank You very much for all the help!!!

What i did was add the following attribute to my submit button where the focus was on!

<xsl:attribute name="onfocus">this.blur(); this.onfocus=null;</xsl:attribute>

This work's fantastically well!


Thank You very much!!!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:29 PM.


Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.