protos1 0 Newbie Poster

Hi Rahul,

Thanks for looking at this. I tried your code and it turns out the the htc script I was using for the transparency hack didn't work properly. I subsituted the one you use above and it worked fine.

Thanks for your help !

Cheers
Colm

protos1 0 Newbie Poster

Below is an example of my problem.

The page initially displays a header button and a div containing a price button which is built using two transparent pngs. The trasparent PNGs use the filter hack and it works fine on the initial page load.

Now if you mouseover the header icon the openDiv() function is called which basically uses javascript to construct another button with the same transparent pngs, and it replaces the first button with the second one. The problem is that the transparent pngs which the button is made of don't appear at all in IE6 !! It works fine in IE7 and firefox. Maybe the filter only gets applied when the page is initially loaded, I don't know. I was hoping someone here might know ?

Any ideas ?

Cheers
Colm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<link rel="stylesheet"  href="test_image.css" type="text/css" charset="utf-8"/>
	<script type="text/javascript">
		function openDiv()
		{
			var str = document.getElementById("button_template").innerHTML;
			var totStr = "";
			for (var k=0; k<1 ;k++ )
			{
				totStr += "<div style='display:block;padding-bottom:10px;color:green'>Colm &nbsp;&nbsp;&nbsp;"+str+"</div>";
			}
			document.getElementById('displayArea').innerHTML = totStr;
		}
	</script>
</head>
<body>
<table id="mainMenu">
	<tr>
		<td class="header_icons">
			<span>
				<img  onmouseover="openDiv()" height="57px" width="55px" src="games_active.png"/>
			</span>
		</td>
</tr>
</table>
<div id="displayArea" class="testStyle">
	<div style='display:block;padding-bottom:10px;color:green'>TESTTEST &nbsp;&nbsp;&nbsp;<div class="priceButton"><img src="infopoint.png" alt="play bar1" style="behavior: url(pngbehavior.htc);" class="priceButtonImage" width="20px" height="13px"></img><div class="priceButtonBg"><span class="mediaPrice">$100.00</span></div><img class="priceButtonRight" src="button_play_right.png" style="behavior: url(pngbehavior.htc);" width="6px" height="13px" alt="play bar"></img></div>
</div>

<div id="button_template" style="display:none">
	<div class="priceButton">
		<img id="testOpacity" src="infopoint.png" alt="play bar1" style="behavior: url(pngbehavior.htc);" class="priceButtonImage" width="20px" height="13px"></img><div class="priceButtonBg"><span class="mediaPrice">$10000.00</span></div><img class="priceButtonRight" src="button_play_right.png" …
protos1 0 Newbie Poster

Hi

I'm building a site which uses ajax and DHTML heavily to build a frontend. Th frontend has a lot of transparent PNGs for which I use the filter hack to display them in IE6. The issue arises when I'm building a new component in javascript which has transparent PNGs in it. If I build a new div and then position it using javascript the transparent pngs don't display at all !!
Has anyone else come across this ?

Cheers
Colm

protos1 0 Newbie Poster

I fixed it yesterday. You're right - I assumed that with no path it would write the file to the same directory as where the exe is located, and usually it does, but selecting a different folder whth the folder dialog changes the default .................
Setting the path worked.

Thanks
Colm

protos1 0 Newbie Poster

Thanks for your replies.

My code looks like this :

private void BrowseBtn2_Click(object sender, System.EventArgs e)
        {
            FolderBrowserDialog fbd2 = new FolderBrowserDialog();
            fbd2.ShowNewFolderButton = false;
            fbd2.RootFolder = Environment.SpecialFolder.MyComputer;

            DialogResult dr = fbd2.ShowDialog();
            if(dr == DialogResult.OK)        
            {
                userDirText2.Text = fbd2.SelectedPath;
                this.writeFile("dialog2.txt", userDirText2.Text);
            }
        }




        private bool writeFile(string filename, string str)
        {
            try
            {        
                progressBox.AppendText("Writing // " + filename + " : " + str + "\n");
                StreamWriter sw = new StreamWriter(filename);
                sw.Write(str);
                sw.Flush();
                sw.Close();
                return true;
            }
            catch (System.IO.IOException) 
            {
                progressBox.AppendText("IO Error Writing To File.\n");
                return false;
            }
        }

This brings up a dialog box with its root folder set to "my computer"
If I just print the selectedPath to a messageBox it looks fine, but when I try and write it to file it doesn't work.

If I leave the rootFolder at the default (the desktop) and select a folder which exists on the desktop (is a desktop subfolder) then it works fine.

Any ideas ?

Thanks
Colm

protos1 0 Newbie Poster

Hi
Has anyone dealt with this windows control ?

I'm trying to get it to work so that the operator can select ANY folder, but it looks like you have to set a RootFolder property to one of several
enumerated options, and if the folder that the user selects is not a subfolder of the chosen RootFolder, then tough luck.
And of course none of the enumerated options for the rootfolder property includes the filesystem root ....................

I've been fighting with it for three days and getting nowhere - has anyone else dealt with this ?


Thanks,
Colm