<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ref="http://purl.org/rss/1.0/modules/reference/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://www.jujubox.co.uk/blog/rss.rdf">
		<title>jujuBox Blog</title>
		<link>http://www.jujubox.co.uk/blog/index.php</link>
		<description><![CDATA[jujubox blogsite]]></description>
		<items>
			<rdf:Seq>
				<rdf:li resource="http://www.jujubox.co.uk/blog/index.php?entry=entry081028-111927" />
				<rdf:li resource="http://www.jujubox.co.uk/blog/index.php?entry=entry081027-155632" />
				<rdf:li resource="http://www.jujubox.co.uk/blog/index.php?entry=entry081027-103920" />
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="http://www.jujubox.co.uk/blog/index.php?entry=entry081028-111927">
		<title>Simple Lightbox Effect using css and html</title>
		<link>http://www.jujubox.co.uk/blog/index.php?entry=entry081028-111927</link>
		<description><![CDATA[The simple lightbox effect can be used to draw attention to a piece of information without changing pages, I have used this effect very nicely in marketing campaigns and personalised web campaigns.<br /><br />to start with this you will need to add the css code:<br /><br /><br /><code><br />.overlay{<br />    display: none;<br />    position: absolute;<br />    top: 0%;<br />    left: 0%;<br />    width: 100%;<br />    height: 100%;<br />    background-color: black;<br />    z-index:1001;<br />    -moz-opacity: 0.9;<br />    opacity:.90;<br />    filter: alpha(opacity=90);<br />}<br /> <br />.lBox_content <br />{<br />    display: none;<br />    position: absolute;<br />    background-color:#fff;<br />    top: 25%;<br />    left: 25%;<br />    width: 50%;<br />    height: 50%;<br />    border: 1px solid red;<br />    z-index:1008;<br />    overflow: auto;<br />} <br /></code><br />  <br />this sets up the styles for the lightbox black page and the white box in the centre of the screen.<br /><br />now to get it working all you have to do is put in the html code:<br /><br />this pice of html is the code to enable the style changes on the link clicked event:<br /><code><br />&lt;div onclick = &quot;document.getElementById(&#039;light&#039;).style.display=&#039;block&#039;;document.getElementById(&#039;fade&#039;).style.display=&#039;block&#039;&quot;&gt;Click&lt;/div&gt;<br /></code><br /><br />now put in the lightbox divs and the overlay div;<br /><br /><code><br />        &lt;div id=&quot;light&quot; class=&quot;lBox_content&quot;&gt;<br />                 &lt;a href = &quot;javascript:void(0)&quot; onclick = &quot;document.getElementById(&#039;light&#039;).style.display=&#039;none&#039;;document.getElementById(&#039;fade&#039;).style.display=&#039;none&#039;&quot;&gt;CLOSE&lt;/a&gt;<br />        &lt;/div&gt;<br />        &lt;div id=&quot;fade&quot; class=&quot;overlay&quot;&gt;&lt;/div&gt;<br /></code><br /><br />The link &#039;CLOSE&#039; will change the styles back to display:none thus closing the lightbox.<br /><br />please see this simple <a href="http://www.jujubox.co.uk/blog/lightboxdemo/index.html" target="_blank" >demo</a><br /><br />enjoy :)<br /><br /><img src="http://signatures.mylivesignature.com/54486/335/B0A5E824196613D36B77B2586313D139.png" width="92" height="66" border="0" alt="" /><br /><br />]]></description>
	</item>
	<item rdf:about="http://www.jujubox.co.uk/blog/index.php?entry=entry081027-155632">
		<title>Sending multipart emails in VB.net using remote html and txt files as content.</title>
		<link>http://www.jujubox.co.uk/blog/index.php?entry=entry081027-155632</link>
		<description><![CDATA[Sending emails using vb.Net is fairly straight forward I know, but it gets a little more complicated if you want to:  <br /><br />a.) send variable data<br />b.) remotely host content<br />c.) send text as well as html<br />d.) authenticate with an smtp server<br /><br /><br /><br />Firstly we need to set the imports and declare the constants:<br /><code><br />&#039;imports<br />Imports System.Net.Mail<br />Imports System.Net<br />Imports System.IO<br />Imports System<br /><br />    &#039;declare constants <br />    &#039;mail server address<br />    Const mailserver As String = &quot;mail.mailserver.com&quot;<br />    &#039;mail server username<br />    Const username As String = &quot;username&quot;<br />    &#039;mail server password<br />    Const password As String = &quot;password&quot;<br />    &#039;email hmtl file as url<br />    Const webmailfile As String = &quot;http://path.to.html/email.html&quot;<br />    &#039;email text only browsers file as url<br />    Const rtfmailfile As String = &quot;http://path.to.text/email.txt&quot;<br /></code><br />now that this is done you will need to create the main email sub routine:<br /><br /><code><br />    Shared Sub EmailWebPage(ByVal email As String, ByVal name As String)<br />        &#039;create the mail message<br />        Dim mail As New MailMessage()<br />        &#039;set the addresses<br />        mail.From = New MailAddress(&quot;fromaddress@mailserver.com&quot;)<br />        &#039;monitoring address as bcc<br />        mail.Bcc.Add(&quot;monitoring@mailserver.com&quot;)<br />        mail.To.Add(email)<br />        &#039;set the content<br />        mail.Subject = &quot;Subject of Email&quot;<br />        &#039;create multipart views from files<br />        Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(ScreenScrapeHtml(webmailfile, name), Nothing, &quot;text/html&quot;)<br />        Dim txtView As AlternateView = AlternateView.CreateAlternateViewFromString(ScreenScrapeText(rtfmailfile, name), Nothing, &quot;text/plain&quot;)<br />        &#039;mail views¬<br />        mail.AlternateViews.Add(htmlView)<br />        mail.AlternateViews.Add(txtView)<br />        &#039;send the message using user credentials<br />        Dim smtp As New SmtpClient(mailserver)<br />        smtp.Credentials = New NetworkCredential(username, password)<br />        smtp.Send(mail)<br />    End Sub &#039;emailWebPage<br /></code><br /><br />next thing to do is retrieve the html and text files from the urls declared in the constants:<br /><br /><code><br />    Shared Function ScreenScrapeHtml(ByVal url As String, ByVal name As String) As String<br />        &#039;get webpage from url<br />        Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)<br />        &#039;create stream from webpage<br />        Dim sr As New StreamReader(objRequest.GetResponse().GetResponseStream())<br />        &#039;convert stream to string and replace variables<br />        Dim result As String = sr.ReadToEnd().Replace(&quot;@name@&quot;, name)<br />        &#039;close stream<br />        sr.Close()<br />        &#039;return webpage as string to html view<br />        Return result<br />    End Function &#039;ScreenScrapeHtml<br /><br />    Shared Function ScreenScrapeText(ByVal url As String, ByVal name As String) As String<br />        &#039;get textfile from url<br />        Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)<br />        &#039;create stream for text file<br />        Dim sr As New StreamReader(objRequest.GetResponse().GetResponseStream())<br />        &#039;convert stream to string and replace variables<br />        Dim result As String = sr.ReadToEnd().Replace(&quot;@name@&quot;, name)<br />        &#039;close stream<br />        sr.Close()<br />        &#039;return textfile as string to text view<br />        Return result<br />    End Function &#039;ScreenScrapeText<br /></code><br /><br />note: where you are replacing @name@ in the streams the @name@ must be inserted as a string in the web files otherwise it will not be replaced with a variable name at runtime.<br /><br />now to run the email you just need to call EmailWebPage(user@mailserver.com, user&#039;s name)<br /><br />hope this makes sense :) <br /><br /><img src="http://signatures.mylivesignature.com/54486/335/B0A5E824196613D36B77B2586313D139.png" width="92" height="66" border="0" alt="" /><br /><br /><br /><br />]]></description>
	</item>
	<item rdf:about="http://www.jujubox.co.uk/blog/index.php?entry=entry081027-103920">
		<title>jQuery Animated Backgrounds Effects</title>
		<link>http://www.jujubox.co.uk/blog/index.php?entry=entry081027-103920</link>
		<description><![CDATA[I have found an effective use of background animation combined with other effects to create quite nice looking web design with interesting interaction effects. <br /><br />see demo <a href="http://hannah.jujubox.co.uk" target="_blank" >hannah&#039;s site</a><br /><br />on a webpage if you create a div with a width of 200px and a height of 200px and you want 3 pages you create a background image of 600px wide and 200px high. <br /><br /><img src="http://www.jujubox.co.uk/blog/backtest/background.jpg" width="512" height="171" border="0" alt="" /><br /><br />then add the css code:<br /><br /><br /><br /><code><br />.page {width:200px;height:200px;background:url(background.jpg);}<br /></code><br /><br />then add the jquery code:<br /><br /><code>&lt;script type=&quot;text/javascript&quot;&gt;<br />$(function(){ 	<br />$(&#039;#link1&#039;) 		<br />.css( {backgroundPosition: &quot;0 0&quot;} ) 		.click(function(){ 			$(&#039;#page&#039;).stop().animate({backgroundPosition: &#039;(0 0)&#039;}, 1000)	}) 			 	<br />$(&#039;#link2&#039;)<br />.css( {backgroundPosition: &quot;0 0&quot;} ) 		.click(function(){ 			$(&#039;#page&#039;).stop().animate({backgroundPosition:&quot;(-200px 0)&quot;}, 1000)<br />}) 	<br />$(&#039;#link3&#039;)<br />.css( {backgroundPosition: &quot;0 0&quot;} ) 		.click(function(){ 			$(&#039;#page&#039;).stop().animate({backgroundPosition:&quot;(-400px 0)&quot;}, 1000)<br />}) <br />}); <br />&lt;/script&gt;</code><br /><br />See <a href="http://www.jujubox.co.uk/blog/backtest/index.html" target="_blank" >Demo</a><br /><br />for this to work you will need the latest version of jQuery and the bgposition plugin<br /><br /><a href="http://www.jujubox.co.uk/hannah/scripts/jquery-1.2.6.js" target="_blank" >jquery</a><br /><a href="http://www.jujubox.co.uk/hannah/scripts/jquery.bgpos.js" target="_blank" >plugin</a><br /><br />enjoy! :)<br /><br /><img src="http://signatures.mylivesignature.com/54486/335/B0A5E824196613D36B77B2586313D139.png" width="92" height="66" border="0" alt="" />]]></description>
	</item>
</rdf:RDF>
